Ver Fonte

Merge commit '12bbb66931feaac778ef4e47b67375ec9b58e839' as 'cde/programs/dtksh/ksh93'

Jon Trulson há 2 anos atrás
pai
commit
cd6da32f7f
100 ficheiros alterados com 21763 adições e 0 exclusões
  1. 19 0
      cde/programs/dtksh/ksh93/.github/workflows/ci.yml
  2. 60 0
      cde/programs/dtksh/ksh93/.gitignore
  3. 87 0
      cde/programs/dtksh/ksh93/LICENSE.md
  4. 892 0
      cde/programs/dtksh/ksh93/NEWS
  5. 211 0
      cde/programs/dtksh/ksh93/README.md
  6. 36 0
      cde/programs/dtksh/ksh93/TODO
  7. 33 0
      cde/programs/dtksh/ksh93/bin/Mamfile_indent
  8. 42 0
      cde/programs/dtksh/ksh93/bin/ignore
  9. 273 0
      cde/programs/dtksh/ksh93/bin/mamprobe
  10. 7429 0
      cde/programs/dtksh/ksh93/bin/package
  11. 54 0
      cde/programs/dtksh/ksh93/bin/shtests
  12. 41 0
      cde/programs/dtksh/ksh93/bin/silent
  13. 6 0
      cde/programs/dtksh/ksh93/docs/index.html
  14. 710 0
      cde/programs/dtksh/ksh93/docs/ksh/builtins.html
  15. 55 0
      cde/programs/dtksh/ksh93/docs/ksh/examples.html
  16. 1004 0
      cde/programs/dtksh/ksh93/docs/ksh/faq.html
  17. 207 0
      cde/programs/dtksh/ksh93/docs/ksh/features.html
  18. 111 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt
  19. 12 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt
  20. 28 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt
  21. 14 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt
  22. 111 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt
  23. 111 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt
  24. 54 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt
  25. 10 0
      cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt
  26. 10 0
      cde/programs/dtksh/ksh93/docs/ksh/index.html
  27. 118 0
      cde/programs/dtksh/ksh93/docs/ksh/ksh.html
  28. 129 0
      cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt
  29. 17 0
      cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt
  30. 66 0
      cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt
  31. 2 0
      cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt
  32. 2 0
      cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt
  33. 260 0
      cde/programs/dtksh/ksh93/lib/package/CONVERT.mk
  34. 1029 0
      cde/programs/dtksh/ksh93/lib/package/INIT.README
  35. 1007 0
      cde/programs/dtksh/ksh93/lib/package/INIT.html
  36. 12 0
      cde/programs/dtksh/ksh93/lib/package/INIT.pkg
  37. 0 0
      cde/programs/dtksh/ksh93/lib/package/INIT.req
  38. 1 0
      cde/programs/dtksh/ksh93/lib/package/INIT.ver
  39. 11 0
      cde/programs/dtksh/ksh93/lib/package/ast-ast.pkg
  40. 22 0
      cde/programs/dtksh/ksh93/lib/package/ast-base.pkg
  41. 0 0
      cde/programs/dtksh/ksh93/lib/package/ast-base.req
  42. 1 0
      cde/programs/dtksh/ksh93/lib/package/ast-base.ver
  43. 13 0
      cde/programs/dtksh/ksh93/lib/package/ast-dss.pkg
  44. 89 0
      cde/programs/dtksh/ksh93/lib/package/ast-ksh.pkg
  45. 0 0
      cde/programs/dtksh/ksh93/lib/package/ast-ksh.req
  46. 1 0
      cde/programs/dtksh/ksh93/lib/package/ast-ksh.ver
  47. 19 0
      cde/programs/dtksh/ksh93/lib/package/ast-make.pkg
  48. 20 0
      cde/programs/dtksh/ksh93/lib/package/ast-open.pkg
  49. 0 0
      cde/programs/dtksh/ksh93/lib/package/ast-open.req
  50. 1 0
      cde/programs/dtksh/ksh93/lib/package/ast-open.ver
  51. 49 0
      cde/programs/dtksh/ksh93/lib/package/ast.def
  52. 5 0
      cde/programs/dtksh/ksh93/lib/package/ast.lic
  53. 45 0
      cde/programs/dtksh/ksh93/lib/package/bsd.def
  54. 1 0
      cde/programs/dtksh/ksh93/lib/package/bsd.lic
  55. 8 0
      cde/programs/dtksh/ksh93/lib/package/epl.def
  56. 14 0
      cde/programs/dtksh/ksh93/lib/package/ksh.pkg
  57. 1537 0
      cde/programs/dtksh/ksh93/lib/package/package.mk
  58. 39 0
      cde/programs/dtksh/ksh93/lib/package/zlib.def
  59. 1 0
      cde/programs/dtksh/ksh93/lib/package/zlib.lic
  60. 16 0
      cde/programs/dtksh/ksh93/src/Mamfile
  61. 870 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe
  62. 260 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/CONVERT.mk
  63. 45 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/MAPLIB.mk
  64. 2 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/MSGFUN.mk
  65. 2 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/MSGKEY.mk
  66. 1393 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile
  67. 13 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/PROBE.mk
  68. 934 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE
  69. 197 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/TEST.mk
  70. 450 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/WWW.mk
  71. 6 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/ar.freebsd12.amd64
  72. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc
  73. 6 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/ar.linux.i386-64
  74. 52 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin
  75. 71 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin07
  76. 71 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin11
  77. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.freebsd
  78. 13 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64
  79. 13 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa
  80. 11 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64
  81. 63 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc
  82. 36 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc
  83. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.aarch64
  84. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-64
  85. 22 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-64-icc
  86. 22 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-icc
  87. 22 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.ia64-icc
  88. 81 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386
  89. 85 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc
  90. 279 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390
  91. 158 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386
  92. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k
  93. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.openbsd
  94. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha
  95. 26 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4
  96. 9 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386
  97. 68 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2
  98. 110 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3
  99. 65 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32
  100. 90 0
      cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4

+ 19 - 0
cde/programs/dtksh/ksh93/.github/workflows/ci.yml

@@ -0,0 +1,19 @@
+name: CI
+
+on: [push]
+
+jobs:
+
+  Linux:
+    name: Linux
+    runs-on: ubuntu-latest
+    steps:
+    - name: Checkout sources
+      uses: actions/checkout@v2
+    - name: Build
+      run: bin/package make
+    - name: Regression tests
+      run: |
+        export TZ=UTC
+        ulimit -n 1024
+        script -q -e -c "bin/shtests"

+ 60 - 0
cde/programs/dtksh/ksh93/.gitignore

@@ -0,0 +1,60 @@
+# Project-specific files
+arch
+tgz
+lcl
+
+# Flat make libs, binaries, etc
+/bin/.paths
+/bin/ar
+/bin/cc
+/bin/crossexec
+/bin/ditto
+/bin/filter
+/bin/hurl
+/bin/iffe
+/bin/ksh
+/bin/mamake
+/bin/mktest
+/bin/ok/
+/bin/proto
+/bin/pty
+/bin/ratz
+/bin/regress
+/bin/release
+/bin/rt
+/bin/shcomp
+/bin/suid_exec
+/fun/
+/include/
+/lib/file/
+/lib/lib/
+/lib/libast.a
+/lib/libcmd.a
+/lib/libdll.a
+/lib/libshell.a
+/lib/libsum.a
+/lib/make/
+/lib/package/gen/
+/lib/probe/
+/man/
+
+# This one keeps changing its license header, causing git to show an
+# uncommitted file. It's always re-copied anyway, and not for direct
+# invocation, so exclude. The source file is: src/cmd/INIT/execrate.sh
+bin/execrate
+
+# Miscellaneous artefacts
+*.bak
+*.sav
+*.old
+*.orig
+.*.swp
+*.DS_Store
+*~
+.nfs*
+*.tmp
+*.rej
+*.project
+*.core
+core
+**/#*#

+ 87 - 0
cde/programs/dtksh/ksh93/LICENSE.md

@@ -0,0 +1,87 @@
+Eclipse Public License - v 1.0
+
+THE ACCOMPANYING PROGRAM IS PROVIDED UNDER THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE, REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE OF THIS AGREEMENT.
+
+1. DEFINITIONS
+
+"Contribution" means:
+
+a) in the case of the initial Contributor, the initial code and documentation distributed under this Agreement, and
+
+b) in the case of each subsequent Contributor:
+
+i) changes to the Program, and
+
+ii) additions to the Program;
+
+where such changes and/or additions to the Program originate from and are distributed by that particular Contributor. A Contribution 'originates' from a Contributor if it was added to the Program by such Contributor itself or anyone acting on such Contributor's behalf. Contributions do not include additions to the Program which: (i) are separate modules of software distributed in conjunction with the Program under their own license agreement, and (ii) are not derivative works of the Program.
+
+"Contributor" means any person or entity that distributes the Program.
+
+"Licensed Patents" mean patent claims licensable by a Contributor which are necessarily infringed by the use or sale of its Contribution alone or when combined with the Program.
+
+"Program" means the Contributions distributed in accordance with this Agreement.
+
+"Recipient" means anyone who receives the Program under this Agreement, including all Contributors.
+
+2. GRANT OF RIGHTS
+
+a) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, distribute and sublicense the Contribution of such Contributor, if any, and such derivative works, in source code and object code form.
+
+b) Subject to the terms of this Agreement, each Contributor hereby grants Recipient a non-exclusive, worldwide, royalty-free patent license under Licensed Patents to make, use, sell, offer to sell, import and otherwise transfer the Contribution of such Contributor, if any, in source code and object code form. This patent license shall apply to the combination of the Contribution and the Program if, at the time the Contribution is added by the Contributor, such addition of the Contribution causes such combination to be covered by the Licensed Patents. The patent license shall not apply to any other combinations which include the Contribution. No hardware per se is licensed hereunder.
+
+c) Recipient understands that although each Contributor grants the licenses to its Contributions set forth herein, no assurances are provided by any Contributor that the Program does not infringe the patent or other intellectual property rights of any other entity. Each Contributor disclaims any liability to Recipient for claims brought by any other entity based on infringement of intellectual property rights or otherwise. As a condition to exercising the rights and licenses granted hereunder, each Recipient hereby assumes sole responsibility to secure any other intellectual property rights needed, if any. For example, if a third party patent license is required to allow Recipient to distribute the Program, it is Recipient's responsibility to acquire that license before distributing the Program.
+
+d) Each Contributor represents that to its knowledge it has sufficient copyright rights in its Contribution, if any, to grant the copyright license set forth in this Agreement.
+
+3. REQUIREMENTS
+
+A Contributor may choose to distribute the Program in object code form under its own license agreement, provided that:
+
+a) it complies with the terms and conditions of this Agreement; and
+
+b) its license agreement:
+
+i) effectively disclaims on behalf of all Contributors all warranties and conditions, express and implied, including warranties or conditions of title and non-infringement, and implied warranties or conditions of merchantability and fitness for a particular purpose;
+
+ii) effectively excludes on behalf of all Contributors all liability for damages, including direct, indirect, special, incidental and consequential damages, such as lost profits;
+
+iii) states that any provisions which differ from this Agreement are offered by that Contributor alone and not by any other party; and
+
+iv) states that source code for the Program is available from such Contributor, and informs licensees how to obtain it in a reasonable manner on or through a medium customarily used for software exchange.
+
+When the Program is made available in source code form:
+
+a) it must be made available under this Agreement; and
+
+b) a copy of this Agreement must be included with each copy of the Program.
+
+Contributors may not remove or alter any copyright notices contained within the Program.
+
+Each Contributor must identify itself as the originator of its Contribution, if any, in a manner that reasonably allows subsequent Recipients to identify the originator of the Contribution.
+
+4. COMMERCIAL DISTRIBUTION
+
+Commercial distributors of software may accept certain responsibilities with respect to end users, business partners and the like. While this license is intended to facilitate the commercial use of the Program, the Contributor who includes the Program in a commercial product offering should do so in a manner which does not create potential liability for other Contributors. Therefore, if a Contributor includes the Program in a commercial product offering, such Contributor ("Commercial Contributor") hereby agrees to defend and indemnify every other Contributor ("Indemnified Contributor") against any losses, damages and costs (collectively "Losses") arising from claims, lawsuits and other legal actions brought by a third party against the Indemnified Contributor to the extent caused by the acts or omissions of such Commercial Contributor in connection with its distribution of the Program in a commercial product offering. The obligations in this section do not apply to any claims or Losses relating to any actual or alleged intellectual property infringement. In order to qualify, an Indemnified Contributor must: a) promptly notify the Commercial Contributor in writing of such claim, and b) allow the Commercial Contributor to control, and cooperate with the Commercial Contributor in, the defense and any related settlement negotiations. The Indemnified Contributor may participate in any such claim at its own expense.
+
+For example, a Contributor might include the Program in a commercial product offering, Product X. That Contributor is then a Commercial Contributor. If that Commercial Contributor then makes performance claims, or offers warranties related to Product X, those performance claims and warranties are such Commercial Contributor's responsibility alone. Under this section, the Commercial Contributor would have to defend claims against the other Contributors related to those performance claims and warranties, and if a court requires any other Contributor to pay any damages as a result, the Commercial Contributor must pay those damages.
+
+5. NO WARRANTY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING, WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT, MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely responsible for determining the appropriateness of using and distributing the Program and assumes all risks associated with its exercise of rights under this Agreement , including but not limited to the risks and costs of program errors, compliance with applicable laws, damage to or loss of data, programs or equipment, and unavailability or interruption of operations.
+
+6. DISCLAIMER OF LIABILITY
+
+EXCEPT AS EXPRESSLY SET FORTH IN THIS AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+7. GENERAL
+
+If any provision of this Agreement is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this Agreement, and without further action by the parties hereto, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.
+
+If Recipient institutes patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Program itself (excluding combinations of the Program with other software or hardware) infringes such Recipient's patent(s), then such Recipient's rights granted under Section 2(b) shall terminate as of the date such litigation is filed.
+
+All Recipient's rights under this Agreement shall terminate if it fails to comply with any of the material terms or conditions of this Agreement and does not cure such failure in a reasonable period of time after becoming aware of such noncompliance. If all Recipient's rights under this Agreement terminate, Recipient agrees to cease use and distribution of the Program as soon as reasonably practicable. However, Recipient's obligations under this Agreement and any licenses granted by Recipient relating to the Program shall continue and survive.
+
+Everyone is permitted to copy and distribute copies of this Agreement, but in order to avoid inconsistency the Agreement is copyrighted and may only be modified in the following manner. The Agreement Steward reserves the right to publish new versions (including revisions) of this Agreement from time to time. No one other than the Agreement Steward has the right to modify this Agreement. The Eclipse Foundation is the initial Agreement Steward. The Eclipse Foundation may assign the responsibility to serve as the Agreement Steward to a suitable separate entity. Each new version of the Agreement will be given a distinguishing version number. The Program (including Contributions) may always be distributed subject to the version of the Agreement under which it was received. In addition, after a new version of the Agreement is published, Contributor may elect to distribute the Program (including its Contributions) under the new version. Except as expressly stated in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to the intellectual property of any Contributor under this Agreement, whether expressly, by implication, estoppel or otherwise. All rights in the Program not expressly granted under this Agreement are reserved.
+
+This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.

+ 892 - 0
cde/programs/dtksh/ksh93/NEWS

@@ -0,0 +1,892 @@
+This documents significant changes in the 93u+m branch of AT&T ksh93.
+For full details, see the git log at: https://github.com/ksh93/ksh
+
+Any uppercase BUG_* names are modernish shell bug IDs.
+
+2021-01-30:
+
+- The -x option to the 'command' built-in now causes it to bypass built-ins
+  so that it always runs/queries an external command. See 'command --man'.
+
+- Fixed a bug in 'command -x' that caused the minimum exit status to be 1 if
+  a command with many arguments was divided into several command invocations.
+
+- The 2020-08-16 fix is improved with a compile-time feature test that
+  detects if and how the OS uses data alignment in the arguments list,
+  maximising the efficiency of 'command -x' for the system it runs on.
+
+2021-01-24:
+
+- Fixed a bug in 'typeset': combining the -u option with -F or -E caused the
+  variable to become a hexadecimal floating point in error.
+
+- Fixed: an unquoted variable expansion evaluated in a DEBUG trap action caused
+  IFS field splitting to be deactivated in code executed after the trap action.
+  This bug was introduced in ksh 93t+ 2009-11-30.
+
+2021-01-23:
+
+- Fixed: when the DEBUG trap was redefined in a subshell, the DEBUG trap in
+  the parent environment was corrupted or the shell crashed.
+  When a redirection was used in a DEBUG trap action, the trap was disabled.
+  DEBUG traps were also incorrectly inherited by subshells and ksh functions.
+  All this was caused by a bug introduced in ksh 93t 2008-07-25.
+
+2021-01-22:
+
+- Compile-time shell options can now be edited in src/cmd/ksh93/SHOPT.sh
+  before building.
+
+2021-01-20:
+
+- Fixed: executing a DEBUG trap in a command substitution had side effects
+  on the exit status ($?) of non-trap commands.
+  This bug was introduced in ksh 93t 2008-11-04.
+
+- The typeset builtin command now gives an informative error message if an
+  incompatible combination of options is given.
+
+2021-01-19:
+
+- Fixed a crash when using 'cd' in a virtual/non-forking subshell in a
+  situation where the current working directory cannot be determined.
+
+2021-01-08:
+
+- Fixed a crash on exceeding the maximum size of the $PS1 prompt.
+  The maximum size is also increased from 160 to 256 bytes.
+
+2021-01-07:
+
+- Fixed a crash that could occur while ksh updated ${.sh.match}.
+
+- Any changes to the hash table (a.k.a. "tracked aliases", i.e. cached $PATH
+  searches) in a subshell now no longer affect the parent shell's hash table.
+
+2021-01-05:
+
+- Fixed a bug in 'cd' that caused 'cd ./foo' to search for 'foo' in $CDPATH.
+
+2021-01-03:
+
+- The invocation
+	$ ksh +s
+  caused an infinite loop and corrupted ~/.sh_history. This is now fixed so
+  that the '-s' option is automatically turned on if there are no non-option
+  command arguments, as documented in Bolsky & Korn (1995), p. 261.
+
+2020-10-22:
+
+- Fixed: 'typeset -F0', 'typeset -E0', and 'typeset -X0' floating point
+  numerics having a precision of 0 with variable assignment.
+  'typeset -F0 x; x=4.56' worked but not 'typeset -F0 x=4.56'.
+
+2020-10-21:
+
+- Fixed: More concisely correct the exporting of uppercase and lowercase
+  variables when only the export and change case attributes were applied.
+  This fix improves upon the previous 2020-09-30 modifications.
+
+2020-10-06:
+
+- The security of virtual/non-forking subshells that locally change the present
+  working directory (PWD) using 'cd' has been improved in two ways.
+  1. On entering a subshell, if the parent shell's PWD proves inaccessible upon
+     saving it, the subshell will now fork into a separate process so the
+     parent process never changes its PWD, avoiding the need to restore it.
+  2. If some attack renders the parent shell's PWD unrestorable *after* ksh
+     enters a virtual subshell, ksh will now error out on exiting it, as
+     continuing would mean running arbitrary commands in the wrong PWD.
+  Hopefully this is an acceptable compromise between performance and security.
+  The proper fix would be to always fork a subshell when changing the working
+  directory within it, but the resulting slowdown would likely be unpopular.
+
+2020-09-30:
+
+- Fixed: 'typeset -xu' and 'typeset -xl' (export + change case) failed to
+  change the case of a variable's value in certain conditions.
+
+- A ksh 93u+ regression was fixed in the combination of ERR trap handling and
+  the 'pipefail' option. A pipeline now triggers the ERR trap correctly again
+  if the 'pipefail' option is active and any of the pipeline elements return a
+  nonzero exit status. Similarly, if both the 'errexit' and 'pipefail' options
+  are active, ksh now correctly exits if any pipeline element returns nonzero.
+
+- Autoloading a function no longer causes the calling script's $LINENO to be
+  off by the number of lines in the function definition file that was loaded.
+  This also corrects line numbers in warnings and error messages.
+
+2020-09-28:
+
+- While executing a ksh-style function, ksh 93u+ ignored all signals for which
+  the function had not set a local trap, except for SIGINT and SIGQUIT. This
+  was contrary to the manual, which states that a "trap condition that is not
+  caught or ignored by the function causes the function to terminate and the
+  condition to be passed on to the caller". This has now been fixed in 93u+m to
+  match the documentation, so that e.g. global traps work as expected again.
+
+2020-09-27:
+
+- The shell's lexical analysis of a 'case' statement within a do...done block
+  within a command substitution of the form $(...) has been fixed so that code
+  like the following no longer throws a spurious syntax error:
+	x=$(for i in 1; do case $i in word) true;; esac; done)
+  Previously, this required a leading parenthesis before 'word', although the
+  syntax error claimed that the ';;' was unexpected.
+
+2020-09-26:
+
+- 'whence -f' now completely ignores the existence of functions, as documented.
+
+- ksh now does not import environment variables whose names are not valid in
+  the shell language, as it would be impossible to change or unset them.
+  However, they stay in the environment to be passed to child processes.
+
+2020-09-25:
+
+- whence -v/-a now reports the path to the file that an "undefined" (i.e.
+  autoloadable) function will be loaded from when invoked, if found in $FPATH.
+
+- When ksh invoked a shell script that does not have a leading
+  #!/hashbang/path, 'ps' and /proc/<PID>/cmdline showed corrupted output if
+  the new script's command line was shorter than that of the invoking script.
+  This has been fixed by wiping the arguments buffer correctly.
+
+2020-09-24:
+
+- An omission made it impossible to turn off brace expansion within command
+  substitutions (`...`, $(...) or ${ ...; }) as the code for parsing these
+  did not check the -B/braceexpand option. This check has now been added.
+
+2020-09-23:
+
+- Fixed a crash that could occur when running a pipeline containing
+  backtick-style command substitutions with job control enabled.
+
+- Fixed a crash that occurred when using 'typeset -u' or 'typeset -l' on a
+  special variable such as PATH, ENV or SHELL.
+
+2020-09-21:
+
+- A bug was fixed that caused command substitutions embedded in here-documents
+  to lose the output of the commands they ran. This bug occurred when ksh was
+  compiled with the SHOPT_SPAWN compile-time option.
+
+- Bugfix: var=$(< file) now reads the file even if the standard inout, standard
+  output and/or standard error file descriptors are closed.
+
+2020-09-20:
+
+- Bugfix: when whence -v/-a found an "undefined" (i.e. autoloadable) function
+  in $FPATH, it actually loaded the function as a side effect of reporting on
+  its existence. Now it only reports, as documented.
+
+- 'whence' will now canonicalise paths properly, resolving '.' and '..'
+  elements in paths given to it. It also no longer prefixes a spurious
+  double slash when doing something like 'cd / && whence bin/echo'.
+
+2020-09-18:
+
+- Setting the 'posix' option now turns off the 'braceexpand' option, as brace
+  expansion is not specified by POSIX and potentially incompatible with sh
+  scripts. In addition, 'set -o posix' now turns on the 'letoctal' option
+  instead of controlling that behaviour directly. 'set +o posix' does the
+  reverse of these.
+
+2020-09-17:
+
+- In the vi and emacs line editors, repeat count parameters can now also be
+  used for the arrow keys and the forward-delete key. E.g., in emacs mode,
+  <ESC> 7 <left-arrow> will now move the cursor seven positions to the left.
+  In vi control mode, this would be entered as: 7 <left-arrow>.
+
+- When a background job on an interactive shell received SIGINT or SIGPIPE, the
+  job termination message was empty. It now shows "Interrupt" or "Broken Pipe".
+
+- The -m (-o monitor) option is no longer ignored when specified on the shell
+  invocation command line.
+
+- A script that is interrupted with Ctrl+C now terminates its background jobs
+  as expected, unless the -m (-o monitor) option was turned on.
+
+2020-09-14:
+
+- Corrected rounding of floating point values by ksh's printf %f formatting
+  operator. Fix contributed by @hyenias.
+
+- The forward-delete key now works as expected in emacs and vi editing modes.
+
+2020-09-11:
+
+- The 'command' regular builtin utility (which runs a simple command, removing
+  special properties) has been made fully POSIX compliant.
+  1. The 'command' name can now result from an expansion (fixing BUG_CMDEXPAN),
+     e.g. 'c=command; "$c" ls' and 'set -- command ls; "$@"' now work.
+  2. If and only if the POSIX mode (the new -o posix shell option) is active,
+     then the 'command' utility now disables not only "special" but also
+     "declaration" properties of builtin commands that it invokes, meaning:
+     a. arguments that start with a variable name followed by '=' are
+	always treated as regular words subject to normal shell syntax;
+     b. 'command' can now stop the shell from exiting if a command that it
+	invokes tries to modify a readonly variable (fixing BUG_CMDSPEXIT).
+
+- The 'history' (== 'hist -l') and 'r' (== 'hist -s') interactive shell
+  history commands have reverted to preset aliases and are now only loaded if
+  the shell is interactive and not initialised in POSIX mode. This avoids
+  unneeded conflicts with external commands by these names, particularly 'r'.
+
+2020-09-09:
+
+- Fixed BUG_LOOPRET2 and related bugs. The 'exit' and 'return' commands without
+  an argument now correctly default to passing down the exit status of the
+  last-run command. Tests like the following, in which the last-run command is
+  'false', now correctly output 1 instead of 0:
+	fn() { return || true; }; false; fn; echo "$?"
+	fn() { while return; do true; done; }; false; fn; echo "$?"
+	fn() { for i in 1; do return; done; }; false; fn; echo "$?"
+	fn() { case 1 in 1) return ;; esac; }; false; fn; echo "$?"
+	fn() { { return; } 2>&1; }; false; fn; echo "$?"
+
+2020-09-05:
+
+- Fixed erroneous syntax errors in parameter expansions such as ${var:-wor)d}
+  or ${var+w(ord}. The parentheses now correctly lose their normal grammatical
+  meaning within the braces. Fix by Eric Scrivner backported from ksh2020.
+
+2020-09-04:
+
+- Fixed a bug that caused a syntax error to be thrown if the special parameter
+  expansions ${!} and ${$} (including braces) were used within a here-document.
+  Bug reported by @Saikiran-m on GitHub.
+
+2020-09-01:
+
+- The bash-style '&>file' redirection shorthand (for '>file 2>&1') is now
+  always recognised and not only when running rc/profile init scripts. It no
+  longer issues a warning. This brings ksh93 in line with mksh, bash and zsh.
+
+- A long-form shell option '-o posix' has been added, which implements a
+  mode for better compatibility with the POSIX standard. It is automatically
+  turned on if ksh is invoked under the name 'sh'.
+  For now, it:
+  * disables the &> redirection shorthand
+  * causes the 'let' arithmetic command to recognise octal numbers by
+    leading zeros regardless of the setting of the 'letoctal' option
+  * causes file descriptors > 2 to be left open when invoking another program
+  * makes the <> redirection operator default to stdin instead of stdout
+    (this keeps the 2020-05-13 BUG_REDIRIO fix for the POSIX mode while
+    restoring traditional ksh93 behaviour for backwards compatibility)
+  * disables a noncompliant 'test -t' == 'test -t 1' compatibility hack
+  * disables passing an exported variable's attributes (such as integer or
+    readonly) to a new ksh process through the environment
+
+2020-08-19:
+
+- Sped up the 'read' command on most systems by 15-25%. Fixed a hanging bug
+  on reading from a FIFO that could occur on macOS.
+
+2020-08-17:
+
+- 'command -p' incorrectly used the hash table entry (a.k.a. tracked alias)
+  for a command if its path was previously hashed. It has now been fixed so
+  it never consults the hash table.
+
+2020-08-16:
+
+- Fixed 'command -x' on macOS, Linux and Solaris by accounting for a 16-byte
+  argument alignment. If execution does fail, it now aborts with an internal
+  error message instead of entering an infinite retry loop.
+
+2020-08-13:
+
+- Fixed memory leaks and a crashing bug that occurred when defining and
+  running functions in subshells.
+
+2020-08-11:
+
+- Fixed an intermittent crash upon running a large number of subshells.
+
+2020-08-10:
+
+- A number of fixes have been applied to the printf formatting directives
+  %H and %#H (as well as the undocumented equivalents %(html)q and %(url)q):
+  1. Both formatters have been made multibyte/UTF-8 aware, and no longer
+     delete multibyte characters. Invalid UTF-8 byte sequences are rendered
+     as ASCII question marks.
+  2. %H no longer wrongly changes spaces to non-breaking spaces (&nbsp;).
+  3. %H now converts the single quote (') to '%#39;' instead of '&apos;'
+     which is not a valid entity in all HTML versions.
+  4. %#H failed to encode some reserved characters (e.g. '?') while encoding
+     some unreserved ones (e.g. '~'). It now percent-encodes all characters
+     except those 'unreserved' as per RFC3986 (ASCII alphanumeric plus -._~).
+
+- Fixed a crash that occurred intermittently after running an external
+  command from a command substitution expanded from the $PS1 shell prompt.
+
+2020-08-09:
+
+- File name generation (a.k.a. pathname expansion, a.k.a. globbing) now
+  never matches the special navigational names '.' (current directory) and
+  '..' (parent directory). This change makes a pattern like .* useful; it
+  now matches all hidden files (dotfiles) in the current directory, without
+  the harmful inclusion of '.' and '..'.
+
+2020-08-08:
+
+- Argument checking in the 'redirect' builtin command (see 2020-06-11) has
+  been improved to error out before executing redirections. For example, an
+  error like 'redirect ls >foo.txt' now will not create 'foo.txt' and will
+  not leave your standard output permanently redirected to it.
+
+2020-08-06:
+
+- Added the '${.sh.pid}' variable as an alternative to Bash's '$BASHPID'.
+  This variable is set to the current shell's PID, unlike '$$' (which is
+  set to the parent shell's PID). In virtual subshells '${.sh.pid}' is not
+  changed from its previous value, while in forked subshells '${.sh.pid}'
+  is set to the subshell's process ID.
+
+2020-08-05:
+
+- Fixed a bug in functions that caused ksh to crash when an array with an
+  unset method was turned into a multidimensional array.
+
+- Fixed a bug that caused scripts to continue running after over-shifting
+  in a function when the function call had a redirection.
+
+- When generating shellquoted strings (such as with 'printf %q'), the
+  hexadecimal value of a quoted unprintable character was not protected with
+  square braces, e.g. 0x12 followed by '3' would be quoted as '\x123', which
+  is a different value. Such strings are now quoted like '\x[12]3' if the
+  next character is a hexadecimal digit.
+
+2020-07-31:
+
+- Fixed a bug that caused multidimensional associative arrays to be created
+  with an extra array member.
+
+- Fixed a bug that caused the expansions of positional parameters $1 - $9,
+  as well as special parameters such as $? and $-, to corrupt any multibyte
+  characters immediately following the expansion if a UTF-8 locale is active.
+
+2020-07-29:
+
+- On a ksh compiled to use fork(2) to run external commands, a bug has been
+  fixed that caused signals (such as SIGINT, Ctrl+C) to be ignored within a
+  non-forked subshell after running an external command within that subshell.
+
+2020-07-25:
+
+- Fixed BUG_MULTIBIFS: Multibyte characters can now be used as IFS
+  delimiters. "$*" was incorrectly joining positional parameters on
+  the first byte of a multibyte character. This was due to truncation
+  based on the incorrect assumption the IFS would never be larger
+  than a single byte.
+
+- Fixed a bug that caused the sleep builtin to continue after being given
+  an unrecognized option. 'sleep -: 1' will now show a usage message and
+  exit instead of sleep for one second.
+
+- Fixed a bug that caused the 'typeset' variable attributes -a, -A, -l, and
+  -u to leak out of a subshell if they were set without assigning a value.
+
+2020-07-23:
+
+- Fixed an infinite loop that could occur when ksh is the system's /bin/sh.
+
+- A command substitution that is run on the same line as a here-document
+  will no longer cause a syntax error.
+
+2020-07-22:
+
+- Fixed two race conditions when running external commands on
+  interactive shells with job control active.
+
+2020-07-20:
+
+- If a shell function and a built-in command by the same name exist,
+  'whence -a' and 'type -a' now report both.
+
+- Fixed a bug that caused file descriptors opened with 'redirect' or 'exec'
+  to survive a subshell environment after exiting it.
+
+2020-07-19:
+
+- Fixed a crash that occurred in the '.' command when using kshdb.
+
+- Fixed a crash that occurred when attempting to use redirection with an
+  invalid file descriptor.
+
+2020-07-16:
+
+- The 'history' and 'r' default aliases have been made regular built-ins,
+  leaving zero default aliases.
+
+- Fixed a bug that caused 'sleep -s' to have no effect with intervals longer
+  than 30 seconds.
+
+- The accuracy of the sleep builtin has been improved. It no longer ignores
+  microseconds and doesn't add extra milliseconds when the interval is less
+  than 31 seconds.
+
+2020-07-15:
+
+- The 'autoload', 'compound', 'float', 'functions', 'integer' and 'nameref'
+  default aliases have been converted into regular built-in commands, so
+  that 'unalias -a' does not remove them. Shell functions can now use
+  these names, which improves compatibility with POSIX shell scripts.
+
+- The End key escape sequence '^[[F' is now handled in the emacs and vi editing
+  modes. The End key moves the cursor to the end of the line (in contrast to
+  the Home key doing the opposite).
+
+2020-07-14:
+
+- Fixed a bug that caused 'set -b' to have no effect.
+
+- Following the 'time' keyword, the 'times' builtin command now also
+  supports millisecond precision.
+
+2020-07-13:
+
+- Fixed a fork bomb that could occur when the vi editor was sent SIGTSTP
+  while running in a ksh script.
+
+- Appending a lone percent to the end of a format specifier no longer
+  causes a syntax error. The extra percent will be treated as a literal
+  '%', like in Bash and zsh.
+
+- The 'time' keyword now has proper support for millisecond precision.
+  Although this feature was previously documented, the 'time' keyword
+  only supported up to centisecond precision, which caused a command
+  like the one below to return '0.000' on certain operating systems:
+  $ TIMEFORMAT='%3R'; time sleep .003
+
+- The 'time' keyword now zero-pads seconds less than ten (like mksh).
+
+2020-07-10:
+
+- Fixed a bug that caused types created with 'typeset -T' to throw an error
+  when used if the type name started with a lowercase 'a'.
+
+- A potential crash due to memory corruption when using many file
+  descriptors has been fixed.
+
+2020-07-09:
+
+- Fixed a crash on syntax error when sourcing/dotting multiple files.
+
+- Fixed a crash when listing indexed arrays.
+
+- Fixed a memory leak when restoring PATH when temporarily setting PATH
+  for a command (e.g. PATH=/foo/bar command ...) or in a virtual subshell.
+
+- Combining ((...)) with redirections no longer causes a syntax error
+  due to the parser handling '>' incorrectly.
+
+- Fixed a bug that corrupted KIA/CQL cross-reference databases created using
+  ksh's -R option; shell warnings were wrongly included in the database file.
+
+- The shell's quoting algorithm (used in xtrace, printf %q, and more) has been
+  fixed for UTF-8 (Unicode) locales; it no longer needlessly and inconsistently
+  encodes normal printable UTF-8 characters into hexadecimal \u[xxxx] codes.
+
+2020-07-07:
+
+- Four of the date formats accepted by 'printf %()T' have had their
+  functionality altered to the common behavior of date(1):
+  - '%k' and '%l' print the current hour with blank padding, the former
+    based on a 24-hour clock and the latter a twelve hour clock. These
+    are common extensions present on Linux and *BSD.
+  - '%f' prints a date with the format string '%Y.%m.%d-%H:%M:%S' (BusyBox).
+  - '%q' prints the quarter of the year (GNU).
+
+2020-07-06:
+
+- 'notty' is now written to the ksh auditing file instead of '(null)' if
+  the user's tty could not be determined.
+
+- Unsetting an associative array no longer causes a memory leak to occur.
+
+2020-07-05:
+
+- In UTF-8 locales, fix corruption of the shell's internal string quoting
+  algorithm (as used by xtrace, 'printf %q', and more) that occurred when
+  the processing of a multibyte character was interrupted.
+
+2020-07-03:
+
+- Backslashes are no longer escaped in the raw Bourne Shell-like editing
+  mode in multibyte locales, i.e. backslashes are no longer treated like
+  Control-V if the emacs and vi modes are disabled.
+
+- Deleting a backslash in vi mode with Control-H or Backspace now only
+  escapes a backslash if it was the previous input. This means erasing a
+  string such as 'ab\\\' will only cause the first backslash to escape a
+  Backspace as '^?', like in emacs mode.
+
+- An odd interaction with Backspace when the last character of a separate
+  buffer created with Shift-C was '\' has been fixed. '^?' will no longer
+  be output repeatedly when attempting to erase a separate buffer with
+  a Backspace. Note that buffers created with Shift-C are not meant to be
+  erasable:
+  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_49
+
+- The 'kill' builtin now supports the SIGINFO signal (on operating systems
+  with support for SIGINFO).
+
+2020-07-02:
+
+- Fixed a crash that occurred if a directory named '.paths' existed in any
+  directory listed in $PATH. The fix was to only read '.paths' if it is a
+  regular file or a symlink to a regular file.
+
+2020-06-30:
+
+- 'read -u' will no longer crash with a memory fault when given an out of
+  range or negative file descriptor.
+
+- The '=~' operator no longer raises an error if a regular expression
+  combines the '{x}' quantifier with a sub-expression.
+
+2020-06-28:
+
+- Variables created with 'typeset -RF' no longer cause a memory fault
+  when accessed.
+
+- Unsetting an array that was turned into a compound variable will no
+  longer cause silent memory corruption.
+
+- Variables created with 'readonly' in functions are now set to the
+  specified value instead of nothing. Note that 'readonly' does not
+  create a function-local scope, unlike 'typeset -r' which does.
+
+2020-06-26:
+
+- Changing to a directory that has a name starting with a '.' will no
+  longer fail if preceded by '../' (i.e. 'cd ../.local' will now work).
+
+2020-06-24:
+
+- Fixed buggy tab completion of tilde-expanded paths such as
+  ~/some in 'vi' mode.
+
+- In the raw/default Bourne Shell-like editing mode that occurs when neither
+  the 'emacs' nor the 'vi' shell option is active:
+  * tab completion is now correctly disabled, instead of enabled and broken;
+  * entering tab characters now moves the cursor the correct amount.
+
+2020-06-23:
+
+- Fixed a bug that caused combining process substitution with redirection
+  to create a bizarre file in the user's current working directory.
+
+- Using process substitution while the shell is interactive no longer
+  causes the process ID of the asynchronous process to be printed.
+
+2020-06-22:
+
+- The 'stop' and 'suspend' default aliases have been converted into regular
+  built-in commands, so that 'unalias -a' does not remove them, 'suspend'
+  can do a couple of sanity checks, and something like
+	cmd=stop; $cmd $!
+  will now work. See 'stop --man' and 'suspend --man' for more information.
+
+- Fixed a bug that caused the kill and stop commands to segfault when given
+  a non-existent job.
+
+- Nested functions no longer ignore variable assignments that were prefixed
+  to their parent function, i.e. 'VAR=foo func' will now set $VAR to 'foo'
+  in the scope of any nested function 'func' runs.
+
+2020-06-20:
+
+- Fixed a bug that caused setting the following variables as readonly in
+  a virtual subshell to affect the environment outside of the subshell:
+  $_
+  ${.sh.name}
+  ${.sh.subscript}
+  ${.sh.level}
+  $RANDOM
+  $LINENO
+
+- Fixed two bugs that caused `unset .sh.lineno` to always produce a memory
+  fault and `(unset .sh.level)` to memory fault when run in nested
+  functions.
+
+2020-06-18:
+
+- A two decade old bug that caused 'whence -a' to base the path of
+  tracked aliases on the user's current working directory has been
+  fixed. Now the real path to tracked aliases is shown when '-a' is
+  passed to the whence command.
+
+2020-06-17:
+
+- A bug in 'unset -f' was fixed that prevented shell functions from
+  unsetting themselves while they were running. A POSIX function no longer
+  crashes when doing so, and a KornShell-style function no longer silently
+  ignores an 'unset -f' on itself. A function of either form now continues
+  running after unsetting itself, and is removed at the end of the run.
+
+2020-06-16:
+
+- Passing the '-d' flag to the read builtin will no longer cause the '-r'
+  flag to be discarded when 'read -r -d' is run.
+
+- Fix BUG_CMDSPASGN: preceding a "special builtin"[*] with 'command' now
+  prevents preceding invocation-local variable assignments from becoming global.
+  [*] https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_14
+
+2020-06-15:
+
+- The 'source' alias has been converted into a regular built-in command.
+
+- Functions that set variables in a virtual subshell will no longer affect
+  variables of the same name outside of the virtual subshell's environment.
+
+- Terse usage messages written by builtin commands now point the user to
+  the --help and --man options for more information.
+
+2020-06-14:
+
+- 'read -S' is now able to correctly handle strings with double quotes
+  nested inside of double quotes.
+
+2020-06-13:
+
+- Fixed a timezone name determination bug on FreeBSD that caused the
+  output from `LC_ALL=C printf '%T' now` to print the wrong time zone name.
+
+2020-06-11:
+
+- Fixed a bug that caused running 'builtin -d' on a special builtin to
+  delete it. The man page for the 'builtin' command documents that special
+  builtins cannot be deleted.
+
+- POSIX compliance fix: It is now possible to set shell functions named
+  'alias' or 'unalias', overriding the commands by the same names. In
+  technical terms, they are now regular builtins, not special builtins.
+
+- The redirect='command exec' alias has been converted to a regular
+  'redirect' builtin command that only accepts I/O redirections, which
+  persist as in 'exec'. This means that:
+  * 'unlias -a' no longer removes the 'redirect' command;
+  * users no longer accidentally get logged out of their shells if
+    they type something intuitive but wrong, like 'redirect ls >file'.
+
+- The undocumented 'login' and 'newgrp' builtin commands have been removed.
+  These replaced your shell session with the external commands by the same
+  name, as in 'exec'. If an error occurred (e.g. due to a typo), you would
+  end up immediately logged out.
+  If you do want this behaviour, you can restore it by setting:
+	alias login='exec login'
+	alias newgrp='exec newgrp'
+
+2020-06-10:
+
+- The 'hash' utility is now a regular builtin instead of an alias to
+  'alias -t --'. The functionality of the old command has been removed
+  from the alias builtin.
+
+- 'set +r' is no longer able to unset the restricted option. This change
+  makes the behavior of 'set +r' identical to 'set +o restricted'.
+
+2020-06-09:
+
+- The 'unalias' builtin will now return a non-zero status if it tries
+  to remove a previously set alias that is not currently set.
+
+2020-06-08:
+
+- Fix an issue with the up arrow key in Emacs editing mode.
+  Emacs editing mode is bugged in ksh93u+ and ksh2020. Let's
+  say you were to run the following commands after starting
+  a fresh instance of ksh:
+  $ alias foo='true'
+  $ unalias foo
+  If you type 'a' and then press the up arrow on your keyboard,
+  ksh will complete 'a' to `alias foo='true'` by doing a reverse
+  search for the last command that starts with 'a'.
+  Run the alias command again, then type 'u' and press the up
+  arrow key again. If ksh is in Vi mode, you will get `unalias foo`,
+  but in Emacs mode you will get `alias foo='true'` again.
+  All subsequent commands were ignored as ksh was saving the first
+  command and only based later searches off of it.
+
+- If 'set -u'/'set -o nounset' is active, then the shell now errors out if a
+  nonexistent positional parameter such as $1, $2, ... is accessed, as other
+  shells do and POSIX requires. (This does *not* apply to "$@" and "$*".)
+
+- If 'set -u'/'set -o nounset' is active, then the shell now errors out if $!
+  is accessed before the shell has launched any background process.
+
+- Removed support for an obscure early 1990s Bell Labs file system research
+  project called 3DFS, which has not existed for decades. This removes:
+  - an obnoxious default alias 2d='set -f;_2d' that turned off your file name
+    wildcard expansion and then tried to run a nonexistent '_2d' command
+  - undocumented builtins 'vmap' and 'vpath' that only printed error messages
+  - a non-functional -V unary operator for the test and [[ commands
+
+- If the last program run by a ksh script exits with a signal (e.g. crashed),
+  ksh itself now exits normally instead of repeating that same signal.
+  In addition, using 'exit x' for x > 256 no longer makes ksh issue a signal.
+
+2020-06-06:
+
+- The 'times' command is now a builtin command that conforms to POSIX
+  instead of an alias for the 'time' command. It displays the accumulated
+  user and system CPU times, one line with the times used by the shell and
+  another with those used by all of the shell's child processes.
+  https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_27
+
+- The default aliases command='command ' and nohup='nohup ' have been
+  removed because they caused breakage in an attempt to circumvent other
+  breakage which is being fixed. In the unlikely even that anyone still
+  needs alias substitution to continue on the command argument following
+  'command' or 'nohup', it's easy to set these aliases yourself.
+
+2020-06-05:
+
+- Fix a bug that caused special variables such as PATH, LANG, LC_ALL,
+  etc. to lose their effect after being unset in a subshell. For example:
+    (unset PATH; PATH=/dev/null; ls); : wrongly ran 'ls'
+    (unset LC_ALL; LC_ALL=badlocale); : failed to print a diagnostic
+  This also fixes BUG_KUNSETIFS: unsetting IFS in a subshell failed if IFS
+  was set to the empty value in the parent shell.
+
+- Fix crashes on some systems, including at least a crash in 'print -v' on
+  macOS, by eliminating an invalid/undefined use of memccpy() on overlapping
+  buffers in the commonly used sfputr() function.
+
+- Fix the ${.sh.subshell} level counter; it is no longer reset to zero when a
+  non-forked subshell happens to fork into a separate process for some reason
+  (an internal implementation detail that should be unnoticeable to scripts).
+
+2020-06-04:
+
+- Fix BUG_KBGPID: the $! special parameter was not set if a background job
+  (somecommand &) or co-process (somecommand |&) was launched as the only
+  command within a braces block with an attached redirection, for example:
+	{
+		somecommand &
+	} >&2
+  With the bug, $! was unchanged; now it contains the PID of somecommand.
+
+2020-05-31:
+
+- Fix a bug in autoloading functions. Directories in the path search list
+  which should be skipped (e.g. because they don't exist) did not interact
+  correctly with autoloaded functions, so that a function to autoload was
+  not always found correctly.
+  Details: https://github.com/att/ast/issues/1454
+
+2020-05-30:
+
+- Fix POSIX compliance of 'test'/'[' exit status on error. The command now
+  returns status 2 instead of 1 when given an invalid number or arithmetic
+  expression, e.g.:
+	[ 123 -eq 123x ]; echo $?
+  now outputs 2 instead of 1.
+
+2020-05-29:
+
+- Fix BUG_FNSUBSH: functions can now be correctly redefined and unset in
+  subshell environments (such as ( ... ), $(command substitutions), etc).
+  Before this fix, this was silently ignored, causing the function by the
+  same name from the parent shell environment to be executed instead.
+	fn() { echo mainsh; }
+	(fn() { echo subsh; }; fn); fn
+  This now correctly outputs "subsh mainsh" instead of "mainsh mainsh".
+	ls() { echo "ls executed"; }
+	(unset -f ls; ls); ls
+  This now correctly lists your directory and then prints "ls executed",
+  instead of printing "ls executed" twice.
+
+- Fix a similar bug with aliases. These can now be correctly unset
+  in subshell environments.
+
+2020-05-21:
+
+- Fix truncating of files with the combined redirections '<>;file' and
+  '<#pattern'. The bug was caused by out-of-sync streams.
+  Details and discussion: https://github.com/att/ast/issues/61
+
+- Patched code injection vulnerability CVE-2019-14868. As a result, you can
+  no longer use expressions in imported numeric environment variables; only
+  integer literals are allowed.
+
+2020-05-20:
+
+- Fix BUG_ISSETLOOP. Expansions like ${var+set} remained static when used
+  within a 'for', 'while' or 'until' loop; the expansions din't change along
+  with the state of the variable, so they could not be used to check whether a
+  variable is set within a loop if the state of that variable changed in the
+  course of the loop.
+
+- Fix BUG_IFSISSET. ${IFS+s} always yielded 's', and [[ -v IFS ]] always
+  yielded true, even if IFS is unset. This applied to IFS only.
+
+2020-05-19:
+
+- Fix 'command -p'. The -p option causes the operating system's standard
+  utilities path (as output by 'getconf PATH') to be searched instead of $PATH.
+  Before this fix, this was broken on non-interactive shells as the internal
+  variable holding the default PATH value was not correctly initialised.
+
+2020-05-16:
+
+- Fix 'test -t 1', '[ -t 1 ]', '[[ -t 1 ]]' in command substitutions.
+  Standard output (file descriptor 1) tested as being on a terminal within a
+  command substitution, which makes no sense as the command substitution is
+  supposed to be catching standard output.
+	v=$(echo begincomsub
+	    [ -t 1 ] && echo oops
+	    echo endcomsub)
+	echo "$v"
+  This now does not output "oops".
+
+2020-05-14:
+
+- Fix syncing history when print -s -f is used. For example, the
+  following now correctly adds a 'cd' command to the history:
+	print -s -f 'cd -- %q\n' "$PWD"
+  Ref.:	https://github.com/att/ast/issues/425
+	https://github.com/att/ast/pull/442
+
+- Fix BUG_PUTIOERR: Output builtins now correctly detect
+  input/output errors. This allows scripts to check for a nonzero exit
+  status on the 'print', 'printf' and 'echo' builtins and prevent possible
+  infinite loops if SIGPIPE is ignored.
+
+- Add a convenient bin/run_ksh_tests script to the source tree that
+  sets up the necessary environment and runs the ksh regression tests.
+
+2020-05-13:
+
+- Fix BUG_CASELIT: an undocumented 'case' pattern matching misbehaviour that
+  goes back to the original Bourne shell, but wasn't discovered until 2018.
+  If a pattern doesn't match as a pattern, it was tried again as a literal
+  string. This broke common validation use cases, e.g.:
+      n='[0-9]'
+      case $n in
+      ( [0-9] )  echo "$n is a number" ;;
+      esac
+  would output "[0-9] is a number" as the literal string fallback matches the
+  pattern. As this misbehaviour was never documented anywhere (not for Bourne,
+  ksh88, or ksh93), and it was never replicated in other shells (not even in
+  ksh88 clones pdksh and mksh), it is unlikely any scripts rely on it.
+     Of course, a literal string fallback, should it be needed, is trivial to
+  implement correctly without this breakage:
+      case $n in
+      ( [0-9] | "[0-9]")  echo "$n is a number or the number pattern" ;;
+      esac
+  Ref.: https://github.com/att/ast/issues/476
+
+- Fix BUG_REDIRIO: ksh used to redirect standard output by default when no
+  file descriptor was specified with the rarely used '<>' reading/writing
+  redirection operator. It now redirects standard input by default, as POSIX
+  specifies and as all other POSIX shells do. To redirect standard output
+  for reading and writing, you now need '1<>'.
+  Ref.:	https://github.com/att/ast/issues/75
+	http://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_07_07

+ 211 - 0
cde/programs/dtksh/ksh93/README.md

@@ -0,0 +1,211 @@
+![](https://github.com/ksh93/ksh/workflows/CI/badge.svg)
+
+# KornShell 93u+m
+
+This repository is used to develop bugfixes
+to the last stable release (93u+ 2012-08-01) of
+[ksh93](http://www.kornshell.com/),
+formerly developed by AT&T Software Technology (AST).
+The sources in this repository were forked from the
+Github [AST repository](https://github.com/att/ast)
+which is no longer under active development.
+
+For user-visible fixes, see [NEWS](https://github.com/ksh93/ksh/blame/master/NEWS)
+and click on commit messages for full details.
+For all fixes, see [the commit log](https://github.com/ksh93/ksh/commits/).
+To see what's left to fix, see [the issue tracker](https://github.com/ksh93/ksh/issues).
+
+## Policy
+
+1. No new features; bug fixes only (but see items 3 and 4).
+   Feature development is for a future separate branch.
+2. No major rewrites. No refactoring code that is not fully understood.
+3. No changes in documented behaviour, except if required for compliance with the
+   [POSIX shell language standard](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html)
+   which David Korn [intended](http://www.kornshell.com/info/) for ksh to follow.
+4. No 100% bug compatibility. Broken and undocumented behaviour gets fixed.
+5. No bureaucracy, no formalities. Just fix it, or report it: create issues,
+   send pull requests. Every interested party is invited to contribute.
+6. To help increase everyone's understanding of this code base, fixes and
+   significant changes should be fully documented in commit messages.
+7. Code style varies somewhat in this historic code base.
+   Your changes should match the style of the code surrounding it.
+   Indent with tabs, assuming an 8-space tab width.
+   Comments always use `/*`...`*/`.
+8. Good judgment may override this policy.
+
+## Why?
+
+Between 2017 and 2020 there was an ultimately unsuccessful
+[attempt](https://github.com/att/ast/tree/2020.0.1)
+to breathe new life into the KornShell by extensively refactoring the last
+unstable AST beta version (93v-).
+While that ksh2020 branch is now abandoned and still has many critical bugs,
+it also had a lot of bugs fixed. More importantly, the AST issue tracker
+now contains a lot of documentation on how to fix those bugs, which made
+it possible to backport many of them to the last stable release instead.
+This ksh 93u+m reboot now incorporates many of these bugfixes, as well as
+many patches from Red Hat, Solaris, as well as new fixes from the community.
+Though there are many bugs left to fix, we are confident at this point that
+93u+m is already the least buggy branch of ksh93 ever released.
+
+## Build
+
+To build ksh with a custom configuration of features, edit
+[`src/cmd/ksh93/SHOPT.sh`](https://github.com/ksh93/ksh/blob/master/src/cmd/ksh93/SHOPT.sh).
+
+Then `cd` to the top directory and run:
+```sh
+bin/package make
+```
+
+The compiled binaries are stored in the `arch` directory, in a subdirectory
+that corresponds to your architecture. The command `bin/package host type`
+outputs the name of this subdirectory.
+
+If you have trouble or want to tune the binaries, you may pass additional
+compiler and linker flags. It is usually best to export these as environment
+variables *before* running `bin/package` as they could change the name of
+the build subdirectory of the `arch` directory, so exporting them is a
+convenient way to keep them consistent between build and test commands.
+**Note that this system uses `CCFLAGS` instead of the usual `CFLAGS`.**
+An example that makes Solaris Studio cc produce a 64-bit binary:
+```sh
+export CCFLAGS="-xc99 -m64 -O" LDFLAGS="-m64"
+bin/package make
+```
+Alternatively you can append these to the command, and they will only be
+used for that command. You can also specify an alternative shell in which
+to run the build scripts this way. For example:
+```sh
+bin/package make SHELL=/bin/bash CCFLAGS="-O2 -I/opt/local/include" LDFLAGS="-L/opt/local/lib"
+```
+
+For more information run
+```sh
+bin/package help
+```
+Many other commands in this repo self-document via the `--help`, `--man` and
+`--html` options; those that do have no separate manual page.
+
+### Test
+
+After compiling, you can run the regression tests.
+Start by reading the information printed by:
+```sh
+bin/shtests --man
+```
+
+### Install
+
+Automated installation is not supported.
+To install manually:
+```sh
+cp arch/$(bin/package host type)/bin/ksh /usr/local/bin/
+cp src/cmd/ksh93/sh.1 /usr/local/share/man/man1/ksh.1
+```
+(adapting the destination directories as required).
+
+## What is ksh93?
+
+The following is the official AT&T description from 1993 that came with the
+ast-open distribution. The text is original, but hyperlinks were added here.
+
+----
+
+KSH-93 is the most recent version of the KornShell Language described in
+"The KornShell Command and Programming Language," by Morris Bolsky and David
+Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6. The KornShell is a shell
+programming language, which is upward compatible with "sh" (the Bourne
+Shell), and is intended to conform to the IEEE P1003.2/ISO 9945.2
+[Shell and Utilities standard](https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html).
+KSH-93 provides an enhanced programming environment in addition to the major
+command-entry features of the BSD shell "csh". With KSH-93, medium-sized
+programming tasks can be performed at shell-level without a significant loss
+in performance. In addition, "sh" scripts can be run on KSH-93 without
+modification.
+
+The code should conform to the
+[IEEE POSIX 1003.1 standard](http://www.opengroup.org/austin/papers/posix_faq.html)
+and to the proposed ANSI-C standard so that it should be portable to all
+such systems. Like the previous version, KSH-88, it is designed to accept
+eight bit character sets transparently, thereby making it internationally
+compatible. It can support multi-byte characters sets with some
+characteristics of the character set given at run time.
+
+KSH-93 provides the following features, many of which were also inherent in
+KSH-88:
+
+* Enhanced Command Re-entry Capability: The KSH-93 history function records
+  commands entered at any shell level and stores them, up to a
+  user-specified limit, even after you log off. This allows you to re-enter
+  long commands with a few keystrokes - even those commands you entered
+  yesterday. The history file allows for eight bit characters in commands
+  and supports essentially unlimited size histories.
+* In-line Editing: In "sh", the only way to fix mistyped commands is to
+  backspace or retype the line. KSH-93 allows you to edit a command line
+  using a choice of EMACS-TC or "vi" functions. You can use the in-line
+  editors to complete filenames as you type them. You may also use this
+  editing feature when entering command lines from your history file. A user
+  can capture keystrokes and rebind keys to customize the editing interface.
+* Extended I/O Capabilities: KSH-93 provides several I/O capabilities not
+  available in "sh", including the ability to:
+  * specify a file descriptor for input and output
+  * start up and run co-processes
+  * produce a prompt at the terminal before a read
+  * easily format and interpret responses to a menu
+  * echo lines exactly as output without escape processing
+  * format output using printf formats.
+  * read and echo lines ending in "\\". 
+* Improved performance: KSH-93 executes many scripts faster than the System
+  V Bourne shell. A major reason for this is that many of the standard
+  utilities are built-in. To reduce the time to initiate a command, KSH-93
+  allows commands to be added as built-ins at run time on systems that
+  support dynamic loading such as System V Release 4.
+* Arithmetic: KSH-93 allows you to do integer arithmetic in any base from
+  two to sixty-four. You can also do double precision floating point
+  arithmetic. Almost the complete set of C language operators are available
+  with the same syntax and precedence. Arithmetic expressions can be used to
+  as an argument expansion or as a separate command. In addition there is an
+  arithmetic for command that works like the for statement in C.
+* Arrays: KSH-93 supports both indexed and associative arrays. The subscript
+  for an indexed array is an arithmetic expression, whereas, the subscript
+  for an associative array is a string.
+* Shell Functions and Aliases: Two mechanisms - functions and aliases - can
+  be used to assign a user-selected identifier to an existing command or
+  shell script. Functions allow local variables and provide scoping for
+  exception handling. Functions can be searched for and loaded on first
+  reference the way scripts are.
+* Substring Capabilities: KSH-93 allows you to create a substring of any
+  given string either by specifying the starting offset and length, or by
+  stripping off leading or trailing substrings during parameter
+  substitution. You can also specify attributes, such as upper and lower
+  case, field width, and justification to shell variables.
+* More pattern matching capabilities: KSH-93 allows you to specify extended
+  regular expressions for file and string matches.
+* KSH-93 uses a hierarchal name space for variables. Compound variables can
+  be defined and variables can be passed by reference. In addition, each
+  variable can have one or more disciplines associated with it to intercept
+  assignments and references.
+* Improved debugging: KSH-93 can generate line numbers on execution traces.
+  Also, I/O redirections are now traced. There is a DEBUG trap that gets
+  evaluated before each command so that errors can be localized.
+* Job Control: On systems that support job control, including System V
+  Release 4, KSH-93 provides a job-control mechanism almost identical to
+  that of the BSD "csh", version 4.1. This feature allows you to stop and
+  restart programs, and to move programs between the foreground and the
+  background.
+* Added security: KSH-93 can execute scripts which do not have read
+  permission and scripts which have the setuid and/or setgid set when
+  invoked by name, rather than as an argument to the shell. It is possible
+  to log or control the execution of setuid and/or setgid scripts. The
+  noclobber option prevents you from accidentally erasing a file by
+  redirecting to an existing file.
+* KSH-93 can be extended by adding built-in commands at run time. In
+  addition, KSH-93 can be used as a library that can be embedded into an
+  application to allow scripting.
+
+Documentation for KSH-93 consists of an "Introduction to KSH-93",
+"Compatibility with the Bourne Shell" and a manual page and a README file.
+In addition, the "New KornShell Command and Programming Language" book is
+available from Prentice Hall.

+ 36 - 0
cde/programs/dtksh/ksh93/TODO

@@ -0,0 +1,36 @@
+TODO for AT&T ksh93, 93u+m bugfix branch
+
+See the issue tracker:
+https://github.com/ksh93/ksh/issues
+
+______
+Fix regression test failures:
+
+- There are many regression test failures on NetBSD.
+
+______
+Fix build system:
+
+- ksh does not currently build on QNX.
+
+______
+Fix currently known bugs affecting shell scripting. These are identified by
+their modernish IDs. For exact details, see code/comments in:
+https://github.com/modernish/modernish/tree/0.16/lib/modernish/cap/
+
+- BUG_BRACQUOT: shell quoting within bracket patterns has no effect. This
+  bug means the '-' retains it special meaning of 'character range', and an
+  initial ! (and, on some shells, ^) retains the meaning of negation, even
+  in quoted strings within bracket patterns, including quoted variables.
+
+- BUG_CSUBSTDO: If standard output (file descriptor 1) is closed before
+  entering a $(command substitution), and any other file descriptors are
+  redirected within the command substitution, commands such as 'echo' will
+  not work within the command substitution, acting as if standard output is
+  still closed.
+
+- BUG_IFSGLOBS: In glob pattern matching (as in case or parameter
+  substitution with # and %), if IFS starts with ? or * and the "$*"
+  parameter expansion inserts any IFS separator characters, those characters
+  are erroneously interpreted as wildcards when quoted "$*" is used as the
+  glob pattern.

+ 33 - 0
cde/programs/dtksh/ksh93/bin/Mamfile_indent

@@ -0,0 +1,33 @@
+#!/usr/bin/env sh
+IFS=''; set -fCu  # safe mode: no split/glob = no quoting headaches
+let() { return $((!($1))); }
+
+# Automatically (re-)indent make...done blocks in a Mamfile.
+# Usage: Mamfile_indent <Mamfile >Mamfile.new
+#
+# Should work on all current POSIX compliant shells.
+# By Martijn Dekker <martijn@inlv.org>, 2021. Public domain.
+
+# Spacing per indentation level. Edit to change style.
+indent='	'  # one tab
+
+# Remove existing indentation, add new indentation.
+indentlvl=0
+sed 's/^[[:space:]]*//' \
+| while read -r line
+do	case $line in
+	'')	continue ;;
+	done*)	let "indentlvl -= 1" ;;
+	esac
+
+	spc=
+	i=0
+	while	let "(i += 1) <= indentlvl"
+	do	spc=$indent$spc
+	done
+	printf '%s\n' $spc$line
+
+	case $line in
+	make*)	let "indentlvl += 1" ;;
+	esac
+done

+ 42 - 0
cde/programs/dtksh/ksh93/bin/ignore

@@ -0,0 +1,42 @@
+########################################################################
+#                                                                      #
+#               This software is part of the ast package               #
+#          Copyright (c) 1994-2011 AT&T Intellectual Property          #
+#                      and is licensed under the                       #
+#                 Eclipse Public License, Version 1.0                  #
+#                    by AT&T Intellectual Property                     #
+#                                                                      #
+#                A copy of the License is available at                 #
+#          http://www.eclipse.org/org/documents/epl-v10.html           #
+#         (with md5 checksum b35adb5213ca9657e911e9befb180842)         #
+#                                                                      #
+#              Information and Software Systems Research               #
+#                            AT&T Research                             #
+#                           Florham Park NJ                            #
+#                                                                      #
+#                 Glenn Fowler <gsf@research.att.com>                  #
+#                                                                      #
+########################################################################
+# non-ksh script for the nmake ignore prefix
+# @(#)ignore (AT&T Research) 1992-08-11
+
+(command set -o posix) 2>/dev/null && set -o posix
+modern_export=`v=; export v=ok 2>/dev/null; echo "$v"`
+
+while	:
+do	case $# in
+	0)	exit 0 ;;
+	esac
+	case $1 in
+	*=*)	case $modern_export in
+		ok)	export "$1" ;;
+		*)	`echo $1 | sed "s/\\([^=]*\\)=\\(.*\\)/eval \\1='\\2'; export \\1/"` ;;
+		esac
+		shift
+		;;
+	*)	break
+		;;
+	esac
+done
+"$@"
+exit 0

+ 273 - 0
cde/programs/dtksh/ksh93/bin/mamprobe

@@ -0,0 +1,273 @@
+########################################################################
+#                                                                      #
+#               This software is part of the ast package               #
+#          Copyright (c) 1994-2011 AT&T Intellectual Property          #
+#                      and is licensed under the                       #
+#                 Eclipse Public License, Version 1.0                  #
+#                    by AT&T Intellectual Property                     #
+#                                                                      #
+#                A copy of the License is available at                 #
+#          http://www.eclipse.org/org/documents/epl-v10.html           #
+#         (with md5 checksum b35adb5213ca9657e911e9befb180842)         #
+#                                                                      #
+#              Information and Software Systems Research               #
+#                            AT&T Research                             #
+#                           Florham Park NJ                            #
+#                                                                      #
+#                 Glenn Fowler <gsf@research.att.com>                  #
+#                                                                      #
+########################################################################
+### this script contains archaic constructs that work with all sh variants ###
+# mamprobe - generate MAM cc probe info
+# Glenn Fowler <gsf@research.att.com>
+
+(command set -o posix) 2>/dev/null && set -o posix
+
+command=mamprobe
+
+bins=`
+	(
+		userPATH=$PATH
+		PATH=/run/current-system/sw/bin:/usr/xpg7/bin:/usr/xpg6/bin:/usr/xpg4/bin:/bin:/usr/bin:$PATH
+		getconf PATH 2>/dev/null && echo "$userPATH" || echo /bin:/usr/bin:/sbin:/usr/sbin:"$userPATH"
+	) | sed 's/:/ /g'
+` || exit
+
+# check the options
+
+opt=
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123)	USAGE=$'
+[-?
+@(#)$Id: mamprobe (AT&T Labs Research) 2011-02-11 $
+]
+[+NAME?mamprobe - generate MAM cc probe info]
+[+DESCRIPTION?\bmamprobe\b generates MAM (make abstract machine) \bcc\b(1)
+	probe information for use by \bmamake\b(1). \acc-path\a is the
+	absolute path of the probed compiler and \ainfo-file\a is where
+	the information is placed. \ainfo-file\a is usually
+	\b$INSTALLROOT/lib/probe/C/mam/\b\ahash\a, where \ahash\a is a hash
+	of \acc-path\a. Any \ainfo-file\a directories are created if needed.
+	If \ainfo-file\a is \b-\b then the probe information is written to
+	the standard output.]
+[+?\bmamprobe\b and \bmamake\b are used in the bootstrap phase of
+	\bpackage\b(1) installation before \bnmake\b(1) is built. The
+	probed variable names are the \bnmake\b(1) names with a \bmam_\b
+	prefix, \bCC\b converted to \bcc\b,  and \b.\b converted to \b_\b.
+	Additional variables are:]{
+		[+_hosttype_?the \bpackage\b(1) host type]
+		[+mam_cc_L?\b-L\b\adir\a supported]
+		[+STDCAT?command to execute for \bcat\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDCHMOD?command to execute for \bchmod\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDCMP?command to execute for \bcmp\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDCP?command to execute for \bcp\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDED?command to execute for \bed\b(1) or \bex\b(1)]
+		[+STDEDFLAGS?flags for \bSTDED\b]
+		[+STDLN?command to execute for \bln\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDMV?command to execute for \bmv\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+		[+STDRM?command to execute for \brm\b(1); prefixed by
+			\bexecrate\b(1) on \b.exe\b challenged systems]
+}
+[d:debug?Enable probe script debug trace.]
+
+info-file cc-path
+
+[+SEE ALSO?\bexecrate\b(1), \bpackage\b(1), \bmamake\b(1), \bnmake\b(1),
+	\bprobe\b(1)]
+'
+	while	getopts -a "$command" "$USAGE" OPT
+	do	case $OPT in
+		d)	opt=-d ;;
+		esac
+	done
+	shift `expr $OPTIND - 1`
+	;;
+*)	while	:
+	do	case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		--)	shift
+			break
+			;;
+		-)	break
+			;;
+		-d)	opt=-d
+			;;
+		-*)	echo $command: $1: unknown option >&2
+			;;
+		*)	break
+			;;
+		esac
+		set ''
+		break
+	done
+	;;
+esac
+
+# check the args
+
+case $1 in
+-)	;;
+/*)	;;
+*)	set '' ;;
+esac
+case $2 in
+/*)	;;
+*)	set '' ;;
+esac
+case $# in
+0|1)	echo "Usage: $command info-file cc-path" >&2; exit 2 ;;
+esac
+info=$1
+shift
+cc=$*
+
+# find the make probe script
+
+ifs=${IFS-'
+	 '}
+IFS=:
+set $PATH
+IFS=$ifs
+script=lib/probe/C/make/probe
+while	:
+do	case $# in
+	0)	echo "$0: ../$script: probe script not found on PATH" >&2
+		exit 1
+		;;
+	esac
+	case $1 in
+	'')	continue ;;
+	esac
+	makeprobe=`echo $1 | sed 's,[^/]*$,'$script,`
+	if	test -x $makeprobe
+	then	break
+	fi
+	shift
+done
+
+# create the info dir if necessary
+
+case $info in
+/*)	i=X$info
+	ifs=${IFS-'
+	 '}
+	IFS=/
+	set $i
+	IFS=$ifs
+	while	:
+	do	i=$1
+		shift
+		case $i in
+		X)	break ;;
+		esac
+	done
+	case $info in
+	//*)	path=/ ;;
+	*)	path= ;;
+	esac
+	while	:
+	do	case $# in
+		0|1)	break ;;
+		esac
+		comp=$1
+		shift
+		case $comp in
+		'')	continue ;;
+		esac
+		path=$path/$comp
+		if	test ! -d $path
+		then	mkdir $path || exit
+		fi
+	done
+	;;
+esac
+
+# generate info in a tmp file and rename when finished
+
+case $info in
+-)	;;
+*)	tmp=${TMPDIR:-/tmp}/mam$$
+	trap "exec >/dev/null; rm -f $tmp" 0 1 2 3 15
+	exec > $tmp
+	echo "probing C language processor $cc for mam information" >&2
+	;;
+esac
+
+echo "note generated by $0 for $cc"
+
+(
+	set '' $opt $cc
+	shift
+	. $makeprobe "$@"
+
+	case " $CC_DIALECT " in
+	*" -L "*)	echo "CC.L = 1" ;;
+	esac
+
+) | sed \
+	-e '/^CC\./!d' \
+	-e 's/^CC./setv mam_cc_/' \
+	-e 's/^\([^=.]*\)\./\1_/' \
+	-e 's/^\([^=.]*\)\./\1_/' \
+	-e 's/ =//' \
+	-e 's/\$("\([^"]*\)")/\1/g' \
+	-e 's/\$(\([^)]*\))/${\1}/g' \
+	-e 's/\${CC\./${mam_cc_}/g'
+
+echo 'setv _hosttype_ ${mam_cc_HOSTTYPE}'
+
+# STD* are standard commands/flags with possible execrate(1)
+
+if	(
+ed <<!
+q
+!
+) < /dev/null > /dev/null 2>&1
+then	STDED=ed
+else	STDED=ex
+fi
+STDEDFLAGS=-
+set STDCAT cat STDCHMOD chmod STDCMP cmp STDCP cp STDLN ln STDMV mv STDRM rm
+while	:
+do	case $# in
+	0|1)	break ;;
+	esac
+	p=$2
+	for d in $bins
+	do	if	test -x $d/$p
+		then	p=$d/$p
+			break
+		fi
+	done
+	eval $1=\$p
+	shift
+	shift
+done
+if	execrate
+then	for n in STDCAT STDCHMOD STDCMP STDCP STDLN STDMV STDRM
+	do	eval $n=\"execrate \$$n\"
+	done
+fi
+for n in STDCAT STDCHMOD STDCMP STDCP STDED STDEDFLAGS STDLN STDMV STDRM
+do	eval echo setv \$n \$$n
+done
+
+# all done
+
+case $info in
+-)	;;
+*)	exec >/dev/null
+	test -f "$info" && rm -f "$info"
+	cp "$tmp" "$info"
+	chmod -w "$info"
+	;;
+esac

+ 7429 - 0
cde/programs/dtksh/ksh93/bin/package

@@ -0,0 +1,7429 @@
+USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+########################################################################
+#                                                                      #
+#               This software is part of the ast package               #
+#          Copyright (c) 1994-2012 AT&T Intellectual Property          #
+#                      and is licensed under the                       #
+#                 Eclipse Public License, Version 1.0                  #
+#                    by AT&T Intellectual Property                     #
+#                                                                      #
+#                A copy of the License is available at                 #
+#          http://www.eclipse.org/org/documents/epl-v10.html           #
+#         (with md5 checksum b35adb5213ca9657e911e9befb180842)         #
+#                                                                      #
+#              Information and Software Systems Research               #
+#                            AT&T Research                             #
+#                           Florham Park NJ                            #
+#                                                                      #
+#                 Glenn Fowler <gsf@research.att.com>                  #
+#                                                                      #
+########################################################################
+### this script contains archaic constructs that work with all sh variants ###
+# package - source and binary package control
+# Glenn Fowler <gsf@research.att.com>
+
+command=package
+
+(command set -o posix) 2>/dev/null && set -o posix
+path=Bad
+case $PATH in
+Bad*)	echo "Cannot be run by zsh in native mode; use a sh symlink to zsh" >&2
+	exit 1 ;;
+esac
+
+unset CDPATH
+case $0 in
+-*)
+	echo "dodgy \$0: $0" >&2
+	exit 1 ;;
+*/package)
+	mydir=`echo "$0" | sed 's,/package$,,'`
+	cd "$mydir" || exit
+	case $PWD in
+	*/bin)	;;
+	*)	echo "this script must live in bin/" >&2
+		exit 1 ;;
+	esac
+	cd .. || exit
+	unset mydir ;;
+package)
+	echo "this script must be invoked with a direct path, e.g. bin/package" >&2
+	exit 1 ;;
+*)
+	echo "this script must be named 'package'" >&2
+	exit 1 ;;
+esac
+
+# shell checks
+checksh()
+{
+	"$1" -ec '
+		# reject csh
+		case 1 in
+		1)	;;
+		esac
+		# reject special use of $path (to use zsh, use a "sh -> zsh" symlink, which disables this)
+		path=Bad
+		case $PATH in
+		Bad*)	exit 1 ;;
+		esac
+		# catch (our own) pipe/socket configuration mismatches
+		date | "$1" -c "read x" || exit 1
+		# check Bourne/POSIX compatible trap exit status (should exit with status 0)
+		trap "exit 0" 0
+		exit 1
+	' x "$1" 2>/dev/null || return 1
+}
+
+LC_ALL=C
+export LC_ALL
+
+TMPDIR=${TMPDIR:-/tmp}
+export TMPDIR
+
+src="cmd contrib etc lib"
+use="/usr/common /exp /usr/local /usr/add-on /usr/addon /usr/tools /usr /opt"
+usr="/home"
+lib="" # nee /usr/local/lib /usr/local/shlib
+ccs="/usr/kvm /usr/ccs/bin"
+org="gnu GNU"
+makefiles="Mamfile"  # ksh 93u+m no longer uses these: Nmakefile nmakefile Makefile makefile
+env="HOSTTYPE NPROC PACKAGEROOT INSTALLROOT PATH"
+checksum=md5sum
+checksum_commands="$checksum md5"
+checksum_empty="d41d8cd98f00b204e9800998ecf8427e"
+
+package_use='=$HOSTTYPE=$PACKAGEROOT=$INSTALLROOT=$EXECROOT=$CC='
+
+PACKAGE_admin_tail_timeout=${PACKAGE_admin_tail_timeout:-"1m"}
+
+CROSS=0
+
+admin_db=admin.db
+admin_env=admin.env
+admin_ditto="ditto --checksum --delete --verbose"
+admin_ditto_update=--update
+admin_ditto_skip="OFFICIAL|core|old|*.core|*.tmp|.nfs*"
+admin_list='PACKAGE.$type.lst'
+admin_ping="ping -c 1 -w 5"
+
+default_url=default.url
+MAKESKIP=${MAKESKIP:-"*[-.]*"}
+RATZ=ratz
+SED=
+TAR=tar
+TARFLAGS=xv
+TARPROBE=B
+TR=
+
+all_types='*.*|sun4'		# all but sun4 match *.*
+
+case `(getopts '[-][123:xyz]' opt --xyz; echo 0$opt) 2>/dev/null` in
+0123)	USAGE=$'
+[-?
+@(#)$Id: package (AT&T Research) 2012-06-28 $
+]'$USAGE_LICENSE$'
+[+NAME?package - source and binary package control]
+[+DESCRIPTION?The \bpackage\b command controls source and binary
+    packages. It is a \bsh\b(1) script coded for maximal portability. All
+    package files are in the \b$PACKAGEROOT\b directory tree.
+    \b$PACKAGEROOT\b must at minimum contain a \bbin/package\b command or a
+    \blib/package\b directory. Binary package files are in the
+    \b$INSTALLROOT\b (\b$PACKAGEROOT/arch/\b\ahosttype\a) tree, where
+    \ahosttpe\a=`\bpackage\b`. All \aactions\a but \bhost\b and \buse\b
+    require the current directory to be under \b$PACKAGEROOT\b. See
+    \bDETAILS\b for more information.]
+[+?Note that no environment variables need be set by the user;
+    \bpackage\b determines the environment based on the current working
+    directory. The \buse\b action starts a \bsh\b(1) with the environment
+    initialized. \bCC\b, \bCCFLAGS\b, \bHOSTTYPE\b and \bSHELL\b may be set
+    by explicit command argument assignments to override the defaults.]
+[+?Packages are composed of components. Each component is built and
+    installed by an \bast\b \bnmake\b(1) makefile. Each package is also
+    described by an \bnmake\b makefile that lists its components and
+    provides a content description. The package makefile and component
+    makefiles provide all the information required to read, write, build
+    and install packages.]
+[+?Package recipients only need \bsh\b(1) and \bcc\b(1) to build and
+    install source packages, and \bsh\b to install binary packages.
+    \bnmake\b and \bksh93\b are required to write new packages. An
+    \b$INSTALLROOT/bin/cc\b script may be supplied for some architectures.
+    This script supplies a reasonable set of default options for compilers
+    that accept multiple dialects or generate multiple object/executable
+    formats.]
+[+?The command arguments are composed of a sequence of words: zero or
+    more \aqualifiers\a, one \aaction\a, and zero or more action-specific
+    \aarguments\a, and zero or more \aname=value\a definitions. \apackage\a
+    names a particular package. The naming scheme is a \b-\b separated
+    hierarchy; the leftmost parts describe ownership, e.g.,
+    \bgnu-fileutils\b, \bast-base\b. If no packages are specified then all
+    packages are operated on. \boptget\b(3) documentation options are also
+    supported. The default with no arguments is \bhost type\b.]
+[+?The qualifiers are:]
+    {
+        [+authorize \aname\a?Remote authorization user name or license
+            acceptance phrase.]
+        [+debug|environment?Show environment and actions but do not
+            execute.]
+        [+flat?Collapse \b$INSTALLROOT\b { bin fun include lib } onto
+            \b$PACKAGEROOT\b.]
+        [+force?Force the action to override saved state.]
+        [+never?Run make -N and show other actions.]
+        [+only?Only operate on the specified packages.]
+        [+password \apassword\a?Remote authorization or license
+	    acceptance password.]
+        [+quiet?Do not list captured action output.]
+        [+show?Run make -n and show other actions.]
+        [+verbose?Provide detailed action output.]
+        [+DEBUG?Trace the package script actions in detail.]
+    }
+[+?The actions are:]
+    {
+        [+admin\b [\ball\b]] [\bdb\b \afile\a]] [\bon\b \apattern\a]][\aaction\a ...]]?Apply
+            \aaction\a ... to the hosts listed in \afile\a. If \afile\a is
+            omitted then \badmin.db\b is assumed. The caller must have
+            \brcp\b(1) and \brsh\b(1) or \bscp\b(1) and \bssh\b(1) access
+            to the hosts. Output for \aaction\a is saved per-host in the
+            file \aaction\a\b.log/\b\ahost\a. Logs can be viewed by
+            \bpackage admin\b [\bon\b \ahost\a]] \bresults\b [\aaction\a]].
+            By default only local PACKAGEROOT hosts are selected from
+            \afile\a; \ball\b selects all hosts. \bon\b \apattern\a selects
+            only hosts matching the \b|\b separated \apattern\a. \afile\a
+            contains four types of lines. Blank lines and lines beginning
+            with \b#\b are ignored. Lines starting with \aid\a=\avalue\a
+            are variable assignments. Set admin_ping to local conventions
+            if \"'$admin_ping$'\" fails. If a package list is not specified
+            on the command line the \aaction\a applies to all packages; a
+            variable assignment \bpackage\b=\"\alist\a\" applies \aaction\a
+            to the packages in \alist\a for subsequent hosts in \afile\a.
+            The remaining line type is a host description consisting of 6
+            tab separated fields. The first 3 are mandatory; the remaining
+            3 are updated by the \badmin\b action. \afile\a is saved in
+            \afile\a\b.old\b before update. The fields are:]
+            {
+                [+hosttype?The host type as reported by
+                    \"\bpackage\b\".]
+                [+[user@]]host?The host name and optionally user name
+                    for \brcp\b(1) and \brsh\b(1) access.]
+                [+[remote::[[master]]::]]]]PACKAGEROOT?The absolute remote package
+                    root directory and optionally the remote protocol (rsh
+                    or ssh) if the directory is on a different server than
+                    the master package root directory. If
+                    \blib/package/admin/'$admin_env$'\b exists under this
+                    directory then it is sourced by \bsh\b(1) before
+                    \aaction\a is done. If this field begins with \b-\b
+                    then the host is ignored. If this field contains \b:\b
+                    then \bditto\b(1) is used to sync the remote \bsrc\b
+                    directory hierarchy to the local one. If [\amaster\a]]:
+		    is specified then the sync is deferred to the \amaster\a
+		    host. If \amaster\a is omitted (two :) then the sync is
+		    disabled. These directories must exist on the remote side:
+		    \blib/package\b, \bsrc/cmd\b, \bsrc/lib\b.]
+                [+date?\aYYMMDD\a of the last action.]
+                [+time?Elapsed wall time for the last action.]
+                [+M T W?The \badmin\b action \bmake\b, \btest\b and
+                    \bwrite\b action error counts. A non-numeric value in
+                    any of these fields disables the corresponding action.]
+	    	[+owner?The owner contact information.]
+		[+attributes?\aname=value\a attributes. Should at least contain
+		    \bcc\b=\acompiler-version\a.]
+            }
+	[+clean | clobber?Delete the \barch/\b\aHOSTTYPE\a hierarchy; this
+	    deletes all generated files and directories for \aHOSTTYPE\a.
+	    The hierarchy can be rebuilt by \bpackage make\b.]
+        [+contents\b [ \apackage\a ... ]]?List description and
+            components for \apackage\a on the standard output.]
+        [+copyright\b [ \apackage\a ... ]]?List the general copyright
+            notice(s) for \apackage\a on the standard output. Note that
+            individual components in \apackage\a may contain additional or
+            replacement notices.]
+        [+export\b [ \avariable\a ...]]?List \aname\a=\avalue\a for
+            \avariable\a, one per line. If the \bonly\b attribute is
+            specified then only the variable values are listed. If no
+	    variables are specified then \b'$env$'\b are assumed.]
+        [+help\b [ \aaction\a ]]?Display help text on the standard
+            error (standard output for \aaction\a).]
+        [+host\b [ \aattribute\a ... ]]?List
+            architecture/implementation dependent host information on the
+            standard output. \btype\b is listed if no attributes are
+            specified. Information is listed on a single line in
+            \aattribute\a order. The attributes are:]
+            {
+                [+canon \aname\a?An external host type name to be
+                    converted to \bpackage\b syntax.]
+                [+cpu?The number of cpus; 1 if the host is not a
+                    multiprocessor.]
+                [+name?The host name.]
+                [+rating?The cpu rating in pseudo mips; the value is
+                    useful useful only in comparisons with rating values of
+                    other hosts. Other than a vax rating (mercifully) fixed
+                    at 1, ratings can vary wildly but consistently from
+                    vendor mips ratings. \bcc\b(1) may be required to
+                    determine the rating.]
+                [+type?The host type, usually in the form
+                    \avendor\a.\aarchitecture\a, with an optional trailing
+                    -\aversion\a. The main theme is that type names within
+                    a family of architectures are named in a similar,
+                    predictable style. OS point release information is
+                    avoided as much as possible, but vendor resistance to
+                    release incompatibilities has for the most part been
+                    futile.]
+            }
+        [+html\b [ \aaction\a ]]?Display html help text on the standard
+            error (standard output for \aaction\a).]
+        [+install\b [ \aarchitecture\a ... ]] \adirectory\a [ \apackage\a ... ]]?Copy
+            the package binary hierarchy to \adirectory\a. If
+            \aarchitecture\a is omitted then all architectures are
+            installed. If \bflat\b is specified then exactly one
+            \aarchitecture\a must be specified; this architecture will be
+            installed in \adirectory\a without the \barch/\b\aHOSTTYPE\a
+            directory prefixes. Otherwise each architecture will be
+            installed in a separate \barch/\b\aHOSTTYPE\a subdirectory of
+            \adirectory\a. The \aarchitecture\a \b-\b names the current
+            architecture. \adirectory\a must be an existing directory. If
+            \apackage\a is omitted then all binary packages are installed.
+            This action requires \bnmake\b.]
+        [+license\b [ \apackage\a ... ]]?List the source license(s) for
+            \apackage\a on the standard output. Note that individual
+            components in \apackage\a may contain additional or replacement
+            licenses.]
+        [+list\b [ \apackage\a ... ]]?List the name, version and
+            prerequisites for \apackage\a on the standard output.]
+        [+make\b [ \apackage\a ]] [ \aoption\a ... ]] [ \atarget\a ... ]]?Build
+	    and install. The default \atarget\a is \binstall\b, which makes
+	    and installs \apackage\a. If the standard output is a terminal
+	    then the output is also captured in
+            \b$INSTALLROOT/lib/package/gen/make.out\b. The build is done in
+            the \b$INSTALLROOT\b directory tree viewpathed on top of the
+            \b$PACKAGEROOT\b directory tree. If \bflat\b is specified then
+            the \b$INSTALLROOT\b { bin fun include lib } directories are
+            linked to the same directories in the package root. Only one
+            architecture may be \bflat\b. Leaf directory names matching the
+            \b|\b-separated shell pattern \b$MAKESKIP\b are ignored. The
+            \bview\b action is done before making. \aoption\a operands are
+	    passed to the underlying make command.]
+        [+read\b [ \apackage\a ... | \aarchive\a ... ]]?Read the named
+            package or archive(s). Must be run from the package root
+            directory. Archives are searched for in \b.\b and
+            \blib/package/tgz\b. Each package archive is read only once.
+            The file \blib/package/tgz/\b\apackage\a[.\atype\a]]\b.tim\b
+            tracks the read time. See the \bwrite\b action for archive
+            naming conventions. Text file archive member are assumed to be
+            ASCII or UTF-8 encoded.]
+        [+regress?\bdiff\b(1) the current and previous \bpackage test\b
+            results.]
+        [+release\b [ [\aCC\a]]\aYY-MM-DD\a [ [\acc\a]]\ayy-mm-dd\a ]]]] [ \apackage\a ]]?Display
+            recent changes for the date range [\aCC\a]]\aYY-MM-DD\a (up to
+        [\acc\a]]\ayy-mm-dd\a.), where \b-\b means lowest (or highest.)
+            If no dates are specified then changes for the last 4 months
+            are listed. \apackage\a may be a package or component name.]
+        [+remove\b [ \apackage\a ]]?Remove files installed for
+            \apackage\a.]
+        [+results\b [ \bfailed\b ]] [ \bpath\b ]] [ \bold\b ]] [\bmake\b | \btest\b | \bwrite\b ]]?List
+            results and interesting messages captured by the most recent
+            \bmake\b (default), \btest\b or \bwrite\b action. \bold\b
+            specifies the previous results, if any (current and previous
+            results are retained.) \b$HOME/.pkgresults\b, if it exists,
+            must contain an \begrep\b(1) expression of result lines to be
+            ignored. \bfailed\b lists failures only and \bpath\b lists the
+            results file path name only.]
+        [+setup\b [ beta ]] [ binary ]] [ source ]] [ \aarchitecture\a ... ]] [ \aurl\a ]] [ \apackage\a ... ]]?This
+            action initializes the current directory as a package root, runs the
+            \bupdate\b action to download new or out of date packages, and runs the
+            \bread\b action on those packages. If \bflat\b is specified then the
+            \b$INSTALLROOT\b { bin fun include lib } directories are linked to the
+            same directories in the package root. Only one architecture may be
+            \bflat\b. See the \bupdate\b and \bread\b action descriptions for
+            argument details.]
+        [+test\b [ \apackage\a ]]?Run the regression tests for
+            \apackage\a. If the standard output is a terminal then the
+            output is also captured in
+            \b$INSTALLROOT/lib/package/gen/test.out\b. In general a package
+            must be made before it can be tested. Components tested with
+            the \bregress\b(1) command require \bksh93\b. If \bonly\b is
+	    also specified then only the listed package components are
+	    tested, otherwise the closure of the components is tested.]
+        [+update\b [ beta ]] [ binary ]] [ source ]] [\aarchitecture\a ... ]] [ \aurl\a ]] [ \apackage\a ... ]]?Download
+            the latest release of the selected and required packages from \aurl\a
+            (e.g., \bhttp://www.research.att.com/sw/download\b) into the directory
+            \b$PACKAGEROOT/lib/package/tgz\b. \bbeta\b accesses beta packages;
+            download these at your own risk. If \aarchitecture\a is omitted then
+            only architectures already present in the \btgz\b directory will be
+            downloaded. If \aarchitecture\a is \b-\b then all posted architectures
+            will be downloaded. If \aurl\a matches \b*.url\b then it is interpreted
+            as a file containing shell variable assignments for \burl\b,
+            \bauthorize\b and \bpassword\b. If \aurl\a is omitted then the
+            definitions for \burl\b, \bauthorize\b and \bpassword\b in
+            \b$PACKAGEROOT/lib/package/tgz/default.url\b, if it exists, are used.
+            If \b$PACKAGEROOT/lib/package/tgz/default.url\b does not exist then it
+            is initialized with the current \burl\b, \bauthorize\b and \bpassword\b
+            values and read permission for the current user only. If \apackage\a is
+            omitted then only packages already present in the tgz directory will be
+            downloaded. If \apackage\a is \b-\b then all posted packages will be
+            downloaded. If \bsource\b and \bbinary\b are omitted then both source
+            and binary packages will be downloaded. If \bonly\b is specified then
+            only the named packages are updated; otherwise the closure of required
+            packages is updated. This action requires \bwget\b(1), \blynx\b(1),
+            \bcurl\b(1) or a shell that supports io to
+	    \b/dev/tcp/\b\ahost\a/\aport\a.]
+        [+use\b [ \auid\a | \apackage\a | . [ 32 | 64 ]] | 32 | 64 | - ]] [ command ...]]?Run
+            \acommand\a, or an interactive shell if \acommand\a is omitted,
+            with the environment initialized for using the package (can you
+            say \ashared\a \alibrary\a or \adll\a without cussing?) If
+            \auid\a or \apackage\a or \a.\a is specified then it is used
+	    to determine a \b$PACKAGEROOT\b, possibly different from
+	    the current directory. For example, to try out bozo`s package:
+            \bpackage use bozo\b. The \buse\b action may be run from any
+            directory. If the file \b$INSTALLROOT/lib/package/profile\b is
+            readable then it is sourced to initialize the environment. 32 or 64
+	    implies \b$PACKAGEROOT\b of . and specifies the target architecture
+	    word size (which may be silently ignored.)]
+        [+verify\b [ \apackage\a ]]?Verify installed binary files
+            against the checksum files in
+            \b$INSTALLROOT/lib/\b\apackage\a\b/gen/*.sum\b. The checksum
+            files contain mode, user and group information. If the checksum
+            matches for a given file then the mode, user and group are
+            changed as necessary to match the checksum entry. A warning is
+            printed on the standard error for each mismatch. Requires the
+            \bast\b package \bcksum\b(1) command.]
+        [+view\b?Initialize the architecture specific viewpath
+            hierarchy. If \bflat\b is specified then the \b$INSTALLROOT\b {
+            bin fun include lib } directories are linked to the same
+            directories in the package root. Only one architecture may be
+            \bflat\b. The \bmake\b action implicitly calls this action.]
+        [+write\b [\aformat\a]] \atype\a ... [ \apackage\a ...]]?Write
+            a package archive for \apackage\a. All work is done in the
+            \b$PACKAGEROOT/lib/package\b directory. \aformat\a-specific
+            files are placed in the \aformat\a subdirectory. A
+            \apackage\a[.\atype\a]]\b.tim\b file in this directory tracks
+            the write time and prevents a package from being read in the
+            same root it was written. If more than one file is generated
+            for a particular \aformat\a then those files are placed in the
+            \aformat\a/\apackage\a subdirectory. File names in the
+            \aformat\a subdirectory will contain the package name, a
+            \ayyyy-mm-dd\a date, and for binary packages, \aHOSTTYPE\a. If
+            \apackage\a is omitted then an ordered list of previously
+            written packages is generated. If \bonly\b is specified then
+            only the named packages will be written; otherwise prerequisite
+            packages are written first. Package components must be listed
+            in \apackage\a\b.pkg\b. \aformat\a may be one of:]
+            {
+                [+cyg?Generate a \bcygwin\b package.]
+                [+exp?Generate an \bexptools\b maintainer source
+                    archive and \aNPD\a file, suitable for \bexpmake\b(1)]
+                [+lcl?Generate a package archive suitable for
+                    restoration into the local source tree (i.e., the
+                    source is not annotated for licencing.)]
+                [+pkg?Generate a \bpkgmk\b(1) package suitable for
+                    \bpkgadd\b(1).]
+                [+rpm?Generate an \brpm\b(1) package.]
+                [+tgz?Generate a \bgzip\b(1) \btar\b(1) package
+                    archive. This is the default.]
+                [+tst?Generate a \btgz\b format package archive in the
+		    \btst\b subdirectory. Version state files are not updated.]
+            }
+        [+?\btype\b specifies the package type which must be one of
+            \bsource\b, \bbinary\b or \bruntime\b. A source package
+            contains the source needed to build the corresponding binary
+            package. A binary package includes the libraries and headers
+            needed for compiling and linking against the public interfaces.
+            A runtime package contains the commands and required dynamic
+            libraries.]
+        [+?A package may be either a \bbase\b or \bdelta\b. A base
+            package contains a complete copy of all components. A delta
+            package contains only changes from a previous base package.
+            Delta recipients must have the \bast\b \bpax\b(1) command (in
+            the \bast-base\b package.) If neither \bbase\b nor \bdelta\b is
+            specified, then the current base is overwritten if there are no
+            deltas referring to the current base. Only the \btgz\b and
+            \blcl\b formats support \bdelta\b. If \bbase\b is specified
+            then a new base and two delta archives are generated: one delta
+            to generate the new base from the old, and one delta to
+            generate the old base from the new; the old base is then
+            removed. If \bdelta\b is specified then a new delta referring
+            to the current base is written.]
+        [+?\apackage\a\b.pkg\b may reference other packages. By default
+            a pointer to those packages is written. The recipient \bpackage
+            read\b will then check that all required packages have been
+            downloaded. If \bclosure\b is specified then the components for
+            all package references are included in the generated package.
+            This may be useful for \blcl\b and versioning.]
+        [+?All formats but \blcl\b annotate each \bsource\b file (not
+            already annotated) with a license comment as it is written to
+            the package archive using \bproto\b(1).]
+    }
+[+DETAILS?The package directory hierarchy is rooted at
+    \b$PACKAGEROOT\b. All source and binaries reside under this tree. A two
+    level viewpath is used to separate source and binaries. The top view is
+    architecture specific, the bottom view is shared source. All building
+    is done in the architecture specific view; no source view files are
+    intentionally changed. This means that many different binary
+    architectures can be made from a single copy of the source.]
+[+?Independent \b$PACKAGEROOT\b hierarchies can be combined by
+    appending \b$INSTALLROOT:$PACKAGEROOT\b pairs to \bVPATH\b. The
+    \bVPATH\b viewing order is from left to right. Each \b$PACKAGEROOT\b
+    must have a \b$PACKAGEROOT/lib/package\b directory.]
+[+?Each package contains one or more components. Component source for
+    the \afoo\a command is in \b$PACKAGEROOT/src/cmd/\b\afoo\a, and source
+    for the \abar\a library is in \b$PACKAGEROOT/src/lib/lib\b\abar\a. This
+    naming is for convenience only; the underlying makefiles handle
+    inter-component build order. The \bINIT\b component, which contains
+    generic package support files, is always made first, then the
+    components named \bINIT\b*, then the component order determined by the
+    closure of component makefile dependencies.]
+[+?\b$PACKAGEROOT/lib/package\b contains package specific files. The
+    package naming convention is \agroup\a[-\apart\a]]; e.g., \bast-base\b,
+    \bgnu-fileutils\b. The *\b.pkg\b files are ast \bnmake\b(1) makefiles
+    that contain the package name, package components, references to other
+    packages, and a short package description. *\b.pkg\b files are used by
+    \bpackage write\b to generate new source and binary packages.]
+[+?\b$PACKAGEROOT/lib/package/\b\agroup\a\b.lic\b files contain license
+    information that is used by the \bast\b \bproto\b(1) and \bnmake\b(1)
+    commands to generate source and binary license strings. \agroup\a is
+    determined by the first \b:PACKAGE:\b operator name listed in the
+    component \bnmake\b makefile. \agroup\a\b.lic\b files are part of the
+    licensing documentation. Each component may have its own \bLICENSE\b file
+    that overrides the \agroup\a\b.lic\b file. The full text of the licenses
+    are in the \b$PACKAGEROOT/lib/package/LICENSES\b and
+    \b$INSTALLROOT/lib/package/LICENSES\b directories.]
+[+?A few files are generated in \b$PACKAGEROOT/lib/package/gen\b and
+    \b$INSTALLROOT/lib/package/gen\b. \apackage\a\b.ver\b contains one line
+    consisting of \apackage version release\a \b1\b for the most recent
+    instance of \apackage\a read into \b$PACKAGEROOT\b, where \apackage\a
+    is the package name, \aversion\a is the \aYYYY-MM-DD\a base version,
+    and \arelease\a is \aversion\a for the base release or \aYYYY-MM-DD\a
+    for delta releases. \apackage\a\b.req\b contains *\b.ver\b entries for
+    the packages required by \apackage\a, except that the fourth field is
+    \b0\b instead of \b1\b. All packages except \bINIT\b require the
+    \bINIT\b package. A simple sort of \apackage\a\b.pkg\b and *\b.ver\b
+    determines if the required package have been read in. Finally,
+    \apackage\a\b.README\b and \apackage\a\a.html\b contain the README text
+    for \apackage\a and all its components. Included are all changes added
+    to the component \bRELEASE\b, \bCHANGES\b or \bChangeLog\b files dated
+    since the two most recent base releases. Component \bRELEASE\b files
+    contain tag lines of the form [\aYY\a]]\aYY-MM-DD\a [ \atext\a ]] (or
+    \bdate\b(1) format dates) followed by README text, in reverse
+    chronological order (newer entries at the top of the file.) \bpackage
+    release\b lists this information, and \bpackage contents ...\b lists
+    the descriptions and components.]
+[+?\b$HOSTYPE\b names the current binary architecture and is determined
+    by the output of \bpackage\b (no arguments.) The \b$HOSTTYPE\b naming
+    scheme is used to separate incompatible executable and object formats.
+    All architecture specific binaries are placed under \b$INSTALLROOT\b
+    (\b$PACKAGEROOT/arch/$HOSTTYPE\b.) There are a few places that match
+    against \b$HOSTTYPE\b when making binaries; these are limited to
+    makefile compiler workarounds, e.g., if \b$HOSTTYPE\b matches \bhp.*\b
+    then turn off the optimizer for these objects. All other architecture
+    dependent logic is handled either by the \bast\b \biffe\b(1) command or
+    by component specific configure scripts. Explicit \b$HOSTYPE\b
+    values matching *,*cc*[,-*,...]] optionally set the default \bCC\b and
+    \bCCFLAGS\b. This is handy for build farms that support different
+    compilers on the same architecture.]
+[+?Each component contains an \bast\b \bnmake\b(1) makefile (either
+    \bNmakefile\b or \bMakefile\b) and a \bMAM\b (make abstract machine)
+    file (\bMamfile\b.) A Mamfile contains a portable makefile description
+    that is used by \bmamake\b(1) to simulate \bnmake\b. Currently there is
+    no support for old-make/gnu-make makefiles; if the binaries are just
+    being built then \bmamake\b will suffice; if source or makefile
+    modifications are anticipated then \bnmake\b (in the \bast-base\b
+    package) should be used. Mamfiles are automatically generated by
+    \bpackage write\b.]
+[+?Most component C source is prototyped. If \b$CC\b (default value
+    \bcc\b) is not a prototyping C compiler then \bpackage make\b runs
+    \bproto\b(1) on portions of the \b$PACKAGEROOT/src\b tree and places
+    the converted output files in the \b$PACKAGEROOT/proto/src\b tree.
+    Converted files are then viewpathed over the original source.
+    \bproto\b(1) converts an ANSI C subset to code that is compatible with
+    K&R, ANSI, and C++ dialects.]
+[+?All scripts and commands under \b$PACKAGEROOT\b use \b$PATH\b
+    relative pathnames (via the \bast\b \bpathpath\b(3) function); there
+    are no embedded absolute pathnames. This means that binaries generated
+    under \b$PACKAGEROOT\b may be copied to a different root; users need
+    only change their \b$PATH\b variable to reference the new installation
+    root \bbin\b directory. \bpackage install\b installs binary packages in
+    a new \b$INSTALLROOT\b.]
+
+[ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
+
+[+SEE ALSO?\bautoconfig\b(1), \bcksum\b(1), \bexecrate\b(1), \bexpmake\b(1),
+	\bgzip\b(1), \bmake\b(1), \bmamake\b(1), \bnmake\b(1), \bpax\b(1),
+	\bpkgadd\b(1), \bpkgmk\b(1), \bproto\b(1), \bratz\b(1), \brpm\b(1),
+	\bsh\b(1), \btar\b(1), \boptget\b(3)]
+'
+	case $* in
+	help)	set -- --man ;;
+	esac
+	while	getopts -a $command "$USAGE" OPT
+	do	:
+	done
+	shift $OPTIND-1
+	;;
+esac
+
+# check the args
+
+case $AR in
+'')	AR=ar ;;
+esac
+case $CC in
+'')	CC=cc ;;
+esac
+case $LD in
+'')	LD=ld ;;
+esac
+case $NM in
+'')	NM=nm ;;
+esac
+
+action=
+admin_all=1
+admin_on=
+authorize=
+bit=
+exec=
+flat=0
+force=0
+global=
+hi=
+html=0
+ifs=${IFS-'
+	 '}
+lo=
+make=
+makeflags='-K'
+nmakeflags=
+nmakesep=
+nl="
+"
+noexec=
+only=0
+output=
+package_src=
+password=
+quiet=0
+show=:
+tab="        "
+verbose=0
+AUTHORIZE=
+DEBUG=
+HURL=
+PROTOROOT=-
+SHELLMAGIC=-
+
+unset FIGNORE BINDIR DLLDIR ETCDIR FUNDIR INCLUDEDIR LIBDIR LOCALEDIR MANDIR SHAREDIR 2>/dev/null || true
+
+while	:
+do	case $# in
+	0)	set host type ;;
+	esac
+	case $1 in
+	admin|clean|clobber|contents|copyright|export|host|install|license|list|make|read|regress|release|remove|results|setup|test|update|use|verify|view|write|TEST)
+		action=$1
+		shift
+		break
+		;;
+	authorize)
+		case $# in
+		1)	echo $command: $1: authorization user name argument expected >&2; exit 1 ;;
+		esac
+		shift
+		authorize=$1
+		shift
+		continue
+		;;
+	debug|environment)
+		exec=echo make=echo show=echo
+		;;
+	flat)	flat=1
+		;;
+	force)	force=1
+		;;
+	never)	exec=echo noexec=-N
+		;;
+	only)	only=1
+		;;
+	password)
+		case $# in
+		1)	echo $command: $1: authorization password argument expected >&2; exit 1 ;;
+		esac
+		shift
+		password=$1
+		shift
+		continue
+		;;
+	quiet)	quiet=1
+		;;
+	show)	exec=echo noexec=-n
+		;;
+	verbose)verbose=1
+		;;
+	DEBUG)	DEBUG=1
+		PS4='+$LINENO:$SECONDS+ '
+		set -x
+		;;
+	help|HELP|html|man|--[?m]*)
+		case $1 in
+		help)	code=0
+			case $2 in
+			'')	exec 1>&2 ;;
+			esac
+			;;
+		html)	code=0 html=1
+			;;
+		*)	code=2
+			exec 1>&2
+			;;
+		esac
+		case $html in
+		1)	bO="<HTML>
+<HEAD>
+<TITLE>$2 package installation instructions</TITLE>
+<HEAD>
+<BODY bgcolor=white link=teal vlink=dimgray>"
+			eO='</BODY>
+</HTML>'
+			bH="<CENTER><H3><FONT face=courier color=red>"
+			eH='</FONT></H3></CENTER>'
+			bP='<P>'
+			bL='<P><TABLE cellpadding=0 cellspacing=2>'
+			bL2='<P><TABLE border=0 cellpadding=0 cellspacing=2>'
+			eL='</TABLE><P>'
+			bT='<TR><TD align=right valign=top><B>'
+			bD='</B></TD><TD align=left>'	eD='</TD></TR>'
+			bB='<B>'			eB='</B>'
+			bI='<I>'			eI='</I>'
+			bX='<PRE>'			eX='</PRE>'
+			bF='<TT>'			eF='</TT>'
+			Camp='&amp;'
+			Mcurl='<A href=../../man/man1/curl.html>curl</A>(1)'
+			Mdate='<A href=../../man/man1/date.html>date</A>(1)'
+			Mfile='<A href=../../man/man1/file.html>file</A>(1)'
+			Mgunzip='<A href=../../man/man1/gzip.html>gunzip</A>(1)'
+			Mhurl='<A href=../../man/man1/hurl.html>hurl</A>(1)'
+			Mlynx='<A href=../../man/man1/lynx.html>lynx</A>(1)'
+			Mnmake='<A href=../../man/man1/nmake.html>nmake</A>(1)'
+			Mpackage='<A href=../../man/man1/package.html>package</A>(1)'
+			Mproto='<A href=../../man/man1/proto.html>proto</A>(1)'
+			Mratz='<A href=../../man/man1/ratz.html>ratz</A>'
+			Mtar='<A href=../../man/man1/tar.html>tar</A>(1)'
+			Mwget='<A href=../../man/man1/wget.html>wget</A>(1)'
+			;;
+		*)	bO=''				eO=''
+			bH=''				eH=':'
+			bP=''
+			bL=''				eL=''
+			bL2=''
+			bT='  '
+			bD=' '				eD=''
+			bB=''				eB=''
+			bI=''				eI=''
+			bX=''				eX=''
+			bF='"'				eF='"'
+			Camp='&'
+			Mcurl='curl(1)'
+			Mdate='date(1)'
+			Mfile='file(1)'
+			Mgunzip='gunzip(1)'
+			Mhurl='hurl(1)'
+			Mlynx='lynx(1)'
+			Mnmake='nmake(1)'
+			Mpackage='package(1)'
+			Mproto='proto(1)'
+			Mratz='ratz'
+			Mtar='tar(1)'
+			Mwget='wget(1)'
+			;;
+		esac
+		case $2 in
+		binary)	echo "${bO}
+${bH}Binary Package Installation Instructions${eH}
+${bL}
+${bT}(1)${bD}Do not install packages as ${bI}root/super-user${eI}. Although some components may
+      have setuid executables, few must be owned by ${bI}root${eI}. These are best
+      changed manually when the security implications are understood.${eD}
+${bT}(2)${bD}Choose a package root directory and cd to it. This will be a local work
+      area for all packages.${eD}
+${bT}(3)${bD}These instructions bypass the ${bI}click to download${eI} package links on the
+      download site. If you already clicked, or if your system does not have
+      ${Mcurl}, ${Mhurl}, ${Mlynx} or ${Mwget} then use the alternate instructions
+      for (3),(4),(5) in plan ${bB}B${eB} below. Plan ${bB}B${eB} installs the ${Mhurl}
+      script which works with ksh and modern bash. The top level URL is:${bX}
+		URL=http://www.research.att.com/sw/download${eX}${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then run:${bX}
+		test -d bin || mkdir bin
+		url=\$URL/package
+		(wget -O - \$url||curl -L \$url||hurl \$url) > bin/package
+		chmod +x bin/package${eX}${eD}
+${bT}(5)${bD}Determine the list of package names you want from the download site, then
+      use the ${Mpackage} command to do the actual download:${bX}
+		bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+			setup binary \$URL ${bI}PACKAGE${eI} ...${eX}
+      (Refer to the ${bB}AUTHORIZATION${eB} paragraph on the main download page for
+      ${bI}NAME${eI}/${bI}PASSWORD${eI} details.)  This downloads the closure of the latest
+      binary package(s); covered and up-to-date packages are not downloaded again unless
+      ${bB}package force ...${eB} is specified. Package content is verified using ${bB}${checksum}${eB}.
+      If the package root will contain only one architecture then you can install in ${bB}bin${eB} and
+      ${bB}lib${eB} instead of ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/bin${eB} and ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/lib${eB} by running this
+      instead:${bX}
+		bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+			flat setup binary \$URL ${bB}PACKAGE${eB} ...${eX}
+      To update the same packages from the same URL run:${bX}
+		bin/package setup binary${eX}${eD}
+${bT}(6)${bD}The packaged binaries are position independent, i.e., they do not
+      contain hard-coded paths. However, commands with related files, like
+      ${Mfile} and ${Mnmake}, require the path of the bin directory to be
+      exported in ${bB}PATH${eb}.${eD}
+${bT}(7)${bD}You can run the binaries directly from the package root, or you can
+      install them in a public root (requires the ${bI}AT${Camp}T${eI} ${Mnmake} command):${bX}
+		bin/package flat install ${bI}DIRECTORY PACKAGE${eI}${eX}
+      This will install in ${bI}DIRECTORY${eI}${bB}/bin${eB} and ${bI}DIRECTORY${eI}${bB}/lib${eB}. If you want to
+      preserve the ${bB}arch/${eB}${bI}HOSTTYPE${eI} hierarchy under ${bI}DIRECTORY${eI} then omit the
+      ${bB}flat${eB} argument. If you don't have ${Mnmake} then the following will do a
+      flat install:${bX}
+		cd \$INSTALLROOT
+		cp -p -r bin lib include ${bI}DIRECTORY${eI}${eX}${eD}
+${bT}(8)${bD}To summarize, after the first time, the download cycle for the latest
+      binary release is:${bX}
+		bin/package setup binary${eX}${eD}${eL}
+
+${bH}Binary Package Installation Instructions -- Plan B${eH}
+${bL}
+${bT}(3)${bD}Create the subdirectory ${bB}lib/package/tgz${eB} and download all package archives
+      into that directory.${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then manually read the ${bB}INIT${eB}
+      binary package:${bX}
+		gunzip < lib/package/tgz/INIT.${bI}YYYY-MM-DD.HOSTTYPE${eI}.tgz |
+			${TAR} ${TARFLAGS}f -${eX}
+      Note that some browsers automatically unzip downloaded without warning.
+      If the gunzip fails try:
+		${TAR} ${TARFLAGS}f -${eX} lib/package/tgz/INIT.${bI}YYYY-MM-DD.HOSTTYPE${eI}.tgz
+      If your system does not have ${Mtar} or ${Mgunzip} then download the ${Mratz}
+      binary package:${bX}
+		mkdir bin
+		cp lib/package/tgz/ratz.${bI}YYYY-MM-DD.HOSTTYPE${eI}.exe bin/ratz
+		chmod +x bin/ratz
+		bin/ratz -lm < lib/package/tgz/INIT.${bI}YYYY-MM-DD/HOSTTYPE${eI}.tgz
+${bT}(5)${bD}Read all unread package archive(s):${bX}
+		bin/package read${eX}
+      Both source and binary packages will be read by this step.${eD}${eL}${eO}"
+			;;
+		intro)	echo "${bO}
+${bH}Package Hierarchy Details${eH}
+${bP}
+The package directory hierarchy is rooted at ${bB}\$PACKAGEROOT${eB}. All source and
+binaries reside under this tree. A two level viewpath is used to separate
+source and binaries. The top view is architecture specific, the bottom view
+is shared source. All building is done in the architecture specific view;
+no source view files are intentionally changed. This means that many
+different binary architectures can be made from a single copy of the source.
+${bP}
+Each package contains one or more components. Component source for the ${bI}FOO${eI}
+command is in ${bB}\$PACKAGEROOT/src/cmd/${eB}${bI}FOO${eI}, and source for the ${bI}BAR${eI} library is
+in ${bB}\$PACKAGEROOT/src/lib/lib${eB}${bI}BAR${eI}. This naming is for convenience only; the
+underlying makefiles handle inter-component build order. The ${bB}INIT${eB} component,
+which contains generic package support files, is always made first, then the
+components named ${bB}INIT${eB}*, then the order determined by the closure of component
+makefile dependencies.
+${bP}
+${bB}\$PACKAGEROOT/lib/package${eB} contains package specific files. The package naming
+convention is ${bI}GROUP${eI}[${bI}-PART${eI}]; e.g., ${bB}ast-base${eB}, ${bB}gnu-fileutils${eB}. The *${bB}.pkg${eB} files
+are ${bB}ast${eB} ${Mnmake} makefiles that contain the package name, package components,
+references to other packages, and a short package description. *${bB}.pkg${eB} files
+are used by ${bF}package write${eF} to generate new source and binary packages.
+${bP}
+${bB}\$PACKAGEROOT/lib/package/${eB}${bI}GROUP${eI}${bB}.lic${eB} files contain license information that
+is used by the ${bB}ast${eB} ${Mproto} and ${Mnmake} commands to generate source and
+binary license strings. ${bI}GROUP${eI} is determined by the first ${bB}:PACKAGE:${eB} operator
+name listed in the component ${bB}nmake${eB} makefile. ${bI}GROUP${eI}${bB}.lic${eB} files are part of the
+licensing documentation.  Each component may have its own ${bB}LICENSE${eB} file that
+overrides the ${bI}GROUP${eI}${bB}.lic${eB} file.  The full text of the licenses are in the
+${bB}\$PACKAGEROOT/lib/package/LICENSES${eB} and ${bB}\$INSTALLROOT/lib/package/LICENSES${eB}
+directories.
+${bP}
+A few files are generated in ${bB}\$PACKAGEROOT/lib/package/gen${eB} and
+${bB}\$INSTALLROOT/lib/package/gen${eB}. ${bI}PACKAGE${eI}${bB}.ver${eB} contains one line consisting of${bX}
+	${bI}PACKAGE VERSION RELEASE${eI} 1${eX}
+for the most recent instance of ${bI}PACKAGE${eI} read into ${bB}\$PACKAGEROOT${eB}, where
+${bI}PACKAGE${eI} is the package name, ${bI}VERSION${eI} is the ${bI}YYYY-MM-DD${eI} base version,
+and ${bI}RELEASE${eI} is ${bI}VERSION${eI} for the base release or ${bI}YYYY-MM-DD${eI} for delta releases.
+${bI}PACKAGE${eI}${bB}.req${eB} contains *${bB}.ver${eB} entries for the packages required by
+${bI}PACKAGE${eI}, except that the fourth field is 0 instead of 1. All packages
+except ${bB}INIT${eB} and ${Mratz} require the ${bB}INIT${eB} package. A simple sort of ${bI}PACKAGE${eI}${bB}.pkg${eB}
+and *${bB}.ver${eB} determines if the required package have been read in. Finally,
+${bI}PACKAGE${eI}${bB}.README${eB} contains the ${bB}README${eB} text for ${bI}PACKAGE${eI} and all its
+components. Included are all changes added to the component ${bB}RELEASE${eB},
+${bB}CHANGES${eB} or ${bB}ChangeLog${eB} files dated since the two most recent base
+releases. Component ${bB}RELEASE${eB} files contain tag lines of the form
+[${bI}CC${eI}]${bI}YY-MM-DD${eI} [ ${bI}TEXT${eI} ] (or ${Mdate} format dates) followed by README
+text, in reverse chronological order (newer entries at the top of the
+file.) ${bF}package release${eF} generates this information, and
+${bF}package contents ...${eF} lists the descriptions and components.
+${bP}
+${bB}\$HOSTYPE${eB} names the current binary architecture and is determined by the
+output of ${bF}package${eF} (no arguments.) The ${bB}\$HOSTTYPE${eB} naming scheme is used
+to separate incompatible executable and object formats. All architecture
+specific binaries are placed under ${bB}\$INSTALLROOT${eB} (${bB}\$PACKAGEROOT/arch/\$HOSTTYPE${eB}.)
+There are a few places that match against ${bB}\$HOSTTYPE${eB} when making binaries; these
+are limited to makefile compiler workarounds, e.g., if ${bB}\$HOSTTYPE${eB} matches
+'hp.*' then turn off the optimizer for these objects. All other architecture
+dependent logic is handled either by ${bB}\$INSTALLROOT/bin/iffe${eB} or by component
+specific configure scripts. Explicit ${bB}\$HOSTYPE${eB} values matching *,*cc*[,-*,...]
+optionally set the default ${bB}CC${eB} and ${bB}CCFLAGS${eB}. This is handy for build
+farms that support different compilers on the same architecture.
+${bP}
+Each component contains an ${bB}ast${eB} ${Mnmake} makefile (either ${bB}Nmakefile${eB} or ${bB}Makefile${eB})
+and a ${bI}MAM${eI} (make abstract machine) file (${bB}Mamfile${eB}.) A Mamfile contains a portable
+makefile description that is used by ${bB}\$INSTALLROOT/bin/mamake${eB} to simulate
+${bB}nmake${eB}. Currently there is no support for old-make/gnu-make makefiles; if
+the binaries are just being built then ${bB}mamake${eB} will suffice; if source or
+makefile modifications are anticipated then ${bB}nmake${eB} (from the ${bB}ast-open${eB} or
+${bB}ast-base${eB} package) should be used. Mamfiles are automatically generated by
+${bF}package write${eF}.
+${bP}
+Most component C source is prototyped. If ${bB}\$CC${eB} (default value ${bB}cc${eB}) is not a
+prototyping C compiler then ${bF}package make${eF} runs ${Mproto} on portions of the
+${bB}\$PACKAGEROOT/src${eB} tree and places the converted output files in the
+${bB}\$PACKAGEROOT/proto/src${eB} tree. Converted files are then viewpathed over the
+original source. The ${bB}ast${eB} ${Mproto} command converts an ANSI C subset to code
+that is compatible with K&R, ANSI, and C++ dialects.
+${bP}
+All scripts and commands under ${bB}\$PACKAGEROOT${eB} use ${bB}\$PATH${eB} relative pathnames;
+there are no embedded absolute pathnames. This means that binaries generated
+under ${bB}\$PACKAGEROOT${eB} may be copied to a different root; users need only change
+their ${bB}\$PATH${eB} variable to reference the new installation root bin directory.
+${bF}package install${eF} installs binary packages in a new ${bB}\$INSTALLROOT${eB}.
+${eO}"
+			;;
+		source)	echo "${bO}
+${bH}Source Package Installation Instructions${eH}
+${bL}
+${bT}(1)${bD}Do not install packages as ${bI}root/super-user${eI}. Although some components may
+      have setuid executables, few must be owned by ${bI}root${eI}. These are best
+      changed manually when the security implications are understood.${eD}
+${bT}(2)${bD}Choose a package root directory and cd to it. This will be a local work
+      area for all packages.
+${bT}(3)${bD}These instructions bypass the ${bI}click to download${eI} package links on the
+      download site. If you already clicked, or if your system does not have
+      ${Mcurl}, ${Mhurl}, ${Mlynx} or ${Mwget} then use the alternate instructions
+      for (3),(4),(5) in plan ${bB}B${eB} below. Plan ${bB}B${eB} installs the ${Mhurl}
+      script which works with ksh and modern bash. The top level URL is:${bX}
+		URL=http://www.research.att.com/sw/download${eX}${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then run:${bX}
+		test -d bin || mkdir bin
+		url=\$URL/package
+		(wget -O - \$url||curl -L \$url||hurl \$url) > bin/package
+		chmod +x bin/package${eX}${eD}
+${bT}(5)${bD}Determine the list of package names you want from the download site, then
+      use the ${Mpackage} command to do the actual download:${bX}
+		bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+			setup source \$URL ${bB}PACKAGE${eB} ...${eX}
+      (Refer to the ${bB}AUTHORIZATION${eB} paragraph on the main download page for
+      ${bI}NAME${eI}/${bI}PASSWORD${eI} details.)  This downloads the closure of the latest
+      source package(s); covered and up-to-date packages are not downloaded again unless
+      ${bB}package force ...${eB} is specified. Package content is verified using ${bB}${checksum}${eB}.
+      If the package root will contain only one architecture then you can install in ${bB}bin${eB} and
+      ${bB}lib${eB} instead of ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/bin${eB} and ${bB}arch/${eB}${bI}HOSTTYPE${eI}${bB}/lib${eB} by running this
+      instead:${bX}
+		bin/package authorize \"${bI}NAME${eI}\" password \"${bI}PASSWORD${eI}\" \\
+			flat setup source \$URL ${bB}PACKAGE${eB} ...${eX}
+      To update the same packages from the same URL run:${bX}
+		bin/package setup source${eX}${eD}
+${bT}(6)${bD}Build and install; all generated files are placed under ${bB}arch/${eB}${bI}HOSTTYPE${eI}
+      (${bB}\$INSTALLROOT${eB}), where ${bI}HOSTTYPE${eI} is the output of ${bB}bin/package${eB} (with no
+      arguments.) ${bI}name=value${eI} arguments are supported; ${bB}CC${eB} and ${bB}debug=1${eB} (compile
+      with -g instead of -O) are likely candidates. The output is written to
+      the terminal and captured in ${bB}\$INSTALLROOT/lib/package/gen/make.out${eB}:${bX}
+		bin/package make${eX}${eD}
+${bT}(7)${bD}List make results and interesting errors:${bX}
+		bin/package results${eX}
+      Run the regression tests:${bX}
+		bin/package test${eX}
+      List test results and errors:${bX}
+		bin/package results test${eX}${eD}
+${bT}(8)${bD}The generated binaries are position independent, i.e., they do not
+      contain hard-coded paths. However, commands with related files, like
+      ${Mfile} and ${Mnmake}, require the path of the bin directory to be
+      exported in ${bB}PATH${eb}.${eD}
+${bT}(9)${bD}You can run the binaries directly from the package root, or you can
+      install them in a public root after you are satisfied with the make and
+      test actions (requires the ${bI}AT${Camp}T${eI} ${Mnmake} command):${bX}
+		bin/package flat install ${bI}DIRECTORY PACKAGE${eI}${eX}
+      This will install in ${bI}DIRECTORY${eI}${bB}/bin${eB} and ${bI}DIRECTORY${eI}${bB}/lib${eB}. If you want to
+      preserve the ${bB}arch/${eB}${bI}HOSTTYPE${eI} hierarchy under ${bI}DIRECTORY${eI} then omit the
+      ${bB}flat${eB} argument. If you don't have ${Mnmake} then the following will do a
+      flat install:${bX}
+		cd \$INSTALLROOT
+		cp -p -r bin lib include ${bI}DIRECTORY${eI}${eX}${eD}
+${bT}(10)${bD}To summarize, after the first time the download, build, and test cycle
+      for the latest source release is:${bX}
+		bin/package setup source
+		bin/package make
+		bin/package test${eX}${eD}${eL}
+
+${bH}Source Package Installation Instructions -- Plan B${eH}
+${bL}
+${bT}(3)${bD}Create the subdirectory ${bB}lib/package/tgz${eB} and download all package archives
+      into that directory.${eD}
+${bT}(4)${bD}If the ${bB}bin/package${eB} script does not exist then manually read the ${bB}INIT${eB}
+      source package:${bX}
+		gunzip < lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz | ${TAR} ${TARFLAGS}f -${eX}
+      Note that some browsers automatically unzip downloaded without warning.
+      If the gunzip fails try:
+		${TAR} ${TARFLAGS}f -${eX} lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz
+      If your system does not have ${Mtar} or ${Mgunzip} then download the ${Mratz}
+      source package, compile it, and manually read the ${bB}INIT${eB}
+      source package:${bX}
+		mkdir bin
+		cp lib/package/tgz/ratz.${bI}YYYY-MM-DD${eI}.c lib/package/tgz/ratz.c
+		cc -o bin/ratz lib/package/tgz/ratz.c
+		bin/ratz -lm < lib/package/tgz/INIT.${bI}YYYY-MM-DD${eI}.tgz
+${bT}(5)${bD}Read all unread package archive(s):${bX}
+		bin/package read${eX}
+      Both source and binary packages will be read by this step.${eD}${eL}${eO}"
+			;;
+		*)	echo "Usage: $command [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]
+
+   The $command command controls source and binary packages. It must be run
+   within the package root directory tree. See \"$command help intro\" for
+   details. In the following, PACKAGE names either a package or a component
+   within a package; if omitted, all packages are operated on. The default
+   action is \"host type\".
+
+   qualifier:
+	authorize NAME Remote authorization name or license acceptance phrase.
+	debug|environment Show environment and actions; do not execute.
+	flat    Collapse \$INSTALLROOT { bin fun include lib } onto \$PACKAGEROOT.
+	force	Force the action to override saved state.
+	never	Run make -N; otherwise show other actions.
+	only	Only operate on the specified packages.
+	password PASSWORD Remote authorization or license acceptance password.
+	quiet	Do not list captured make and test action output.
+	show	Run make -n; otherwise show other actions.
+	DEBUG	Trace the package script actions in detail for debugging.
+   action:
+	admin [ all ] [ db FILE ] [ on PATTERN ] [ action ... ]
+		Apply ACTION ... to the hosts listed in FILE. If FILE is
+		omitted then "admin.db" is assumed. The caller must have rcp(1)
+		and rsh(1) or scp(1) and ssh(1) access to the hosts. Output
+		for the action is saved per-host in ACTION.log/HOST. Logs
+		can be viewed by \"package admin [on HOST] results [ACTION]\".
+		By default only local PACKAGEROOT hosts are selected from FILE;
+		\"all\" selects all hosts. \"on PATTERN\" selects only
+		hosts matching the | separated PATTERN. FILE contains four
+		types of lines. Blank lines and lines beginning with # are
+		ignored. Lines starting with id=value are variable assignments.
+		Set admin_ping to local conventions if \"$admin_ping\" fails.
+		If a package list is not specified on the command line the
+		action applies to all packages; a variable assignment
+		package=list applies action to the packages in list for
+		subsequent hosts in FILE. The remaining line type is a host
+		description consisting of 6 tab separated fields. The first 3
+		are mandatory; the remaining 3 are updated by the admin action:
+		   hosttype
+			   The host type as reported by package.
+		   [user@]host
+			   The host name and optionally user name for rcp(1)
+			   and rsh(1) access.
+		   [remote:[[master]:]]PACKAGEROOT
+			   The absolute remote package root directory and
+			   optionally the remote prorocol (rsh or ssh) if
+			   the directory is on a different server than the
+			   master package root directory. If
+			   lib/package/admin/$admin_env exists under
+			   this directory then it is sourced by sh(1)
+			   before ACTION is done. If this field begins with -
+			   then the host is ignored. If this field contains
+			   : then ditto(1) is used to sync the remote src
+			   directory hierarchy to the local one. If [master]:
+			   is specified then the sync is deferred to the
+			   master host. If master is omitted (two :) then
+			   the sync is disabled. These directories must exist
+			   on the remote side: lib/package, src/cmd, src/lib.
+		   date    YYMMDD of the last action.
+		   date    Elapsed wall time of the last action.
+		   M T W   The admin action make, test and write action error
+			   counts. A non-numeric value in any of these fields
+			   disables the corresponding action.
+	    	   owner   The owner contact information.
+		   attributes
+		           NAME=VALUE attributes. Should at least contain
+			   cc=compiler-version.
+	clean | clobber
+	    Delete the arch/HOSTTYPE hierarchy; this deletes all generated
+	    files and directories for HOSTTYPE. The hierarchy can be rebuilt
+	    by package make.]
+	contents [ package ... ]
+		List description and components for PACKAGE on the standard
+		output.
+	copyright [ package ... ]
+		List the general copyright notice(s) for PACKAGE on the
+		standard output. Note that individual components in PACKAGE
+		may contain additional or replacement notices.
+	export [ VARIABLE ... ]
+		List NAME=VALUE for each VARIABLE, one per line. If the
+		\"only\" attribute is specified then only the variable
+		values are listed. If no variables are specified then
+		$env are assumed.
+	help [ ACTION ]
+		Display help text on the standard error [ standard output
+		for ACTION ].
+	host [ canon cpu name rating type ... ]
+		List architecture/implementation dependent host information
+		on the standard output. type is listed if no attributes are
+		specified. Information is listed on a single line in attributes
+		order. The attributes are:
+		   canon   The next argument is a host type name to be
+			   converted to package syntax.
+		   cpu     The number of cpus; 1 if the host is not a
+			   multiprocessor.
+		   name    The host name.
+		   rating  The cpu rating in pseudo mips; the value is useful
+			   useful only in comparisons with rating values of
+			   other hosts. Other than a vax rating fixed at 1,
+			   ratings can vary wildly but consistently from
+			   vendor mips ratings. cc(1) may be required to
+			   determine the rating.
+	           type    The host type, usually of the form
+			   vendor.architecture, with an optional trailing
+			   -version. The main theme is that type names within
+			   a family of architectures are named in a similar,
+			   predictable style. Os point release information is
+			   avoided as much as possible, but vendor resistance
+			   to release incompatibilities has for the most part
+			   been futile.
+	html [ ACTION ]
+		Display html help text on the standard error [ standard output
+		for ACTION ].
+	install [ ARCHITECTURE ... ] DIR [ PACKAGE ... ]
+		Copy the package binary hierarchy to DIR. If ARCHITECTURE is
+		omitted then all architectures are installed. If the \"flat\"
+		attribute is specified then exactly one ARCHITECTURE must be
+		specified; this architecture will be installed in DIR without
+		the \"arch/HOSTTYPE\" directory prefixes. Otherwise each
+		architecture will be installed in a separate \"arch/HOSTTYPE\"
+		subdirectory of DIR. The ARCHITECTURE - names the current
+		architecture. DIR must be an existing directory. If PACKAGE
+		is omitted then all binary packages are installed. This action
+		requires nmake.
+	license [ package ... ]
+		List the source license(s) for PACKAGE on the standard output.
+		Note that individual components in PACKAGE may contain
+		additional or replacement licenses.
+	list [ PACKAGE ... ]
+		List the name, version and prerequisites for PACKAGE on the
+		standard output.
+	make [ PACKAGE ] [ OPTION ... ] [ TARGET ... ]
+		Build and install. The default TARGET is install, which
+		makes and installs all packages. If the standard output
+		is a terminal then the output is also captured in
+		\$INSTALLROOT/lib/package/gen/make.out. The build is done
+		in the \$INSTALLROOT directory tree viewpathed on top of
+		the \$PACKAGEROOT directory tree. If \"flat\" is specified then
+		the \$INSTALLROOT { bin fun include lib } directories are
+		linked to the same directories in the package root. Only
+		one architecture may be flat. Leaf directory names matching
+		the |-separated shell pattern \$MAKESKIP are ignored. The
+		view action is done before making. OPTION operands are
+		passed to the underlying make command.
+	read [ package ... | archive ... ]
+		Read the named package archive(s). Must be run from the
+		package root directory. Archives are searched for in .
+		and lib/package/tgz. Each package is read only once. The
+		file lib/package/tgz/package[.type].tim tracks the read time.
+		See the write action for archive naming conventions. Text
+		file archive member are assumed to be ASCII or UTF-8 encoded.
+	regress diff(1) the current and previous package test results.
+	release [ [CC]YY-MM-DD [ [cc]yy-mm-dd ] ] [ package ]
+		Display recent changes since [CC]YY-MM-DD (up to [cc]yy-mm-dd),
+		where - means lowest (or highest.) If no dates are specified
+		then changes for the last 4 months are listed. PACKAGE may
+		be a package or component name.
+	remove PACKAGE
+		Remove files installed for PACKAGE.
+	results [ path ] [ old ] [ make | test ]
+		List results and interesting messages captured by the most
+		recent make (default), test or write action. old specifies the
+		previous results, if any (current and previous results are
+		retained.) $HOME/.pkgresults, if it exists, must contain an
+		egrep(1) expression of result lines to be ignored. failed lists
+		failures only and path lists the results file path only.
+	setup [ beta ] [ binary ] [ source ] [ ARCHITECTURE ... ] [ URL ] [ PACKAGE ... ]
+		The action initializes the current directory as a package root,
+		runs the update action to download new or out of date packages,
+		and runs the read action on those packages. If \"flat\" is
+		specified then the \$INSTALLROOT { bin fun include lib }
+		directories are linked to the same directories in the package
+		root. Only one architecture may be flat. See the update and
+		read actions for argument details.
+	test [ PACKAGE ]
+		Run the regression tests for PACKAGE. If the standard output
+		is a terminal then the output is also captured in
+		\$INSTALLROOT/lib/package/gen/test.out. In general a package
+		must be made before it can be tested. Components tested with
+		the \bregress\b(1) command require \bksh93\b. If only is
+		also specified then only the listed package components are
+		tested, otherwise the closure of the components is tested.
+	update [ beta ] [ binary ] [ source ] [ ARCHITECTURE ... ] [ URL ] [ PACKAGE ... ]
+		Download the latest release of the selected and required
+		packages from URL (e.g.,
+		http://www.research.att.com/sw/download) into the directory
+		\$PACKAGEROOT/lib/package/tgz. beta accesses beta packages;
+		download these at your own risk. If ARCHITECTURE is omitted
+		then only architectures already present in the tgz directory
+		will be downloaded. If ARCHITECTURE is - then all posted
+		architectures will be downloaded. If URL matches *.url then
+		it is interpreted as a file containing shell variable
+		assignments for url, authorize and password. If URL is
+		omitted then the definitions for url, authorize and password
+		in \$PACKAGEROOT/lib/package/tgz/$default_url, if it exists,
+		are used. If \$PACKAGEROOT/lib/package/tgz/$default_url does
+		not exist then it is initialized with the current url,
+		authorize and password values and read permission for the
+		current user only. If PACKAGE is omitted then only
+		packages already present in the tgz directory will be
+		downloaded. If PACKAGE is - then all posted packages will be
+		downloaded. If source and binary are omitted then both source
+		and binary packages will be downloaded. If \bonly\b is
+		specified then only the named packages are updated; otherwise
+		the closure of required packages is updated. This action
+		requires wget(1), lynx(1), curl(1) or a shell that supports
+		io to /dev/tcp/HOST/PORT.
+   	use [ uid | PACKAGE | . [ 32 | 64 ] | 32 | 64 | - ] [ COMMAND ... ]
+   		Run COMMAND or an interactive shell if COMMAND is omitted, with
+		the environment initialized for using the package (can you say
+		shared library without cussing?) If uid or PACKAGE or . is
+		specified then it is used to determine a \$PACKAGEROOT,
+		possibly different from the current directory. For example, to
+		try out bozo's package: \"package use bozo\". In this case the
+		command may be run from any directory. If the file
+		\$INSTALLROOT/lib/package/profile is readable then it is
+		sourced to initialize the environment. 32 or 64 implies
+		\$PACKAGEROOT of . and specifies the target architecture word
+		size (which may be silently ignored.)
+	verify [ PACKAGE ]
+		Verify installed binary files against the checksum files in
+		\$INSTALLROOT/lib/package/gen/*.sum. The checksum files contain
+		mode, user and group information. If the checksum matches
+		for a given file then the mode, user and group are changed
+		as necessary to match the checksum entry. A warning is printed
+		on the standard error for each mismatch. Requires the ast
+		package cksum(1) command.
+	view
+		Initialize the architecture specific viewpath hierarchy. The
+		make action implicitly calls this action. If \"flat\" is specified
+		then the \$INSTALLROOT { bin fun include lib } directories are
+		linked to the same directories in the package root. Only one
+		architecture may be flat.
+	write [closure] [cyg|exp|lcl|pkg|rpm|tgz|tst] [base|delta]
+			[binary|runtime|source] PACKAGE
+		Write a package archive for PACKAGE. All work is done in the
+		\$PACKAGEROOT/lib/package directory. FORMAT-specific files
+		are placed in the FORMAT subdirectory. A PACKAGE[.TYPE].tim
+		file in this directory tracksthe write time and prevents a
+		package from being read in the same root it was written. If
+		more than one file is generated for a particular FORMAT then
+		those files are placed in the FORMAT/PACKAGE subdirectory.
+		File names in the FORMAT subdirectory will contain the package
+		name, a YYYY-MM-DD date, and for binary packages, HOSTTYPE.
+		If PACKAGE is omitted then an ordered list of previously
+		written packages is generated. If \"only\" is specified then
+		only the named packages will be written; otherwise
+		prerequisite packages are written first. Package components
+		must be listed in PACKAGE.pkg. FORMAT may be one of:
+		   cyg  generate a cygwin package
+		   exp  generate an exptools(1) maintainer source archive
+		        and NPD file in the exp subdirectory, suitable for
+			expmake(1); support files are placed in the
+			exp/PACKAGE subdirectory
+		   lcl	generate a package archive or delta in the lcl
+			subdirectory, suitable for restoration into the
+			primary source tree (no source licence annotation)
+		   pkg	generate a pkgmk(1) package, suitable for pkgadd(1)
+		   rpm  generate an rpm(1) package
+		   tgz  generate a gzip(1) tar(1) package archive; this is
+			the default
+		   tst  generate tgz FORMAT package archive in the tst
+			subdirectory; version state files are not updated
+		The package type must be one of source, binary or runtime.
+		A source package contains the source needed to build the
+		corresponding binary package. A binary package includes the
+		libraries and headers needed for compiling and linking
+		against the public interfaces. A runtime package contains
+		the commands and required dynamic libraries.  A package may
+		be either a base or delta. A base package contains a
+		complete copy of all components.  A delta package contains
+		only changes from a previous base package. Delta recipients
+		must have the ast pax(1) command (in the ast-base package.)
+		If neither base nor delta is specified, then the current
+		base is overwritten if there are no deltas referring to the
+		current base. Only the tgz and lcl formats support delta.
+		If base is specified then a new base and two delta archives
+		are generated: one delta to generate the new base from the
+		old, and one delta to generate the old base from the new;
+		the old base is then removed. If delta is specified then a
+		new delta referring to the current base is written.
+		package.pkg may reference other packages. By default a
+		pointer to those packages is written. The recipient package
+		read will then check that all required packages have been
+		downloaded. If closure is specified then the components for
+		all package references are included in the generated
+		package.  This may be useful for lcl and versioning.  All
+		formats but lcl annotate each source file (not already
+		annotated) with a license comment as it is written to the
+		package archive using proto(1).
+   name=value:
+	variable definition: typically CC=cc or CCFLAGS=-g."
+			;;
+		esac
+		exit $code
+		;;
+	*=*)	set DEFAULT host type "$@"
+		;;
+	*)	echo "Usage: $command [ options ] [ qualifier ... ] [ action ] [ arg ... ] [ n=v ... ]" >&2
+		exit 2
+		;;
+	esac
+	global="$global $1"
+	shift
+done
+
+# gather HOSTTYPE *,* options
+# 	,*cc*,-*,...	set CC and CCFLAGS
+
+hostopts()
+{
+	_ifs_=$IFS
+	IFS=,
+	set '' $HOSTTYPE
+	IFS=$_ifs_
+	shift
+	while	:
+	do	case $# in
+		0|1)	break ;;
+		esac
+		shift
+		case $1 in
+		*cc*)	CC=$1
+			while	:
+			do	case $# in
+				0|1)	break ;;
+				esac
+				case $2 in
+				-*)	case $assign_CCFLAGS in
+					?*)	assign_CCFLAGS="$assign_CCFLAGS " ;;
+					esac
+					assign_CCFLAGS="$assign_CCFLAGS$2"
+					shift
+					;;
+				*)	break
+					;;
+				esac
+			done
+			;;
+		esac
+	done
+}
+
+# collect command line targets and definitions
+
+case $_PACKAGE_HOSTTYPE_ in
+?*)	HOSTTYPE=$_PACKAGE_HOSTTYPE_
+	KEEP_HOSTTYPE=1
+	;;
+*)	KEEP_HOSTTYPE=0
+	;;
+esac
+KEEP_PACKAGEROOT=0
+KEEP_SHELL=0
+USER_VPATH=
+args=
+assign=
+assign_CCFLAGS=
+for i
+do	case $i in
+	*:*=*)	args="$args $i"
+		continue
+		;;
+	*=*)	eval `echo ' ' "$i" | sed 's,^[ 	]*\([^=]*\)=\(.*\),n=\1 v='\''\2'\'','`
+		;;
+	esac
+	case $i in
+	AR=*|LD=*|NM=*)
+		assign="$assign $n='$v'"
+		eval $n='$'v
+		;;
+	CC=*)	eval $n='$'v
+		;;
+	CCFLAGS=*)
+		eval $n='$'v
+		assign_CCFLAGS="CCFLAGS=\"\$CCFLAGS\""
+		;;
+	HOSTTYPE=*)
+		eval $n='$'v
+		case $HOSTTYPE in
+		?*)	KEEP_HOSTTYPE=1 ;;
+		esac
+		;;
+	HURL=*)	eval $n='$'v
+		;;
+	PACKAGEROOT=*)
+		eval $n='$'v
+		case $PACKAGEROOT in
+		?*)	KEEP_PACKAGEROOT=1 ;;
+		esac
+		;;
+	SHELL=*)eval $n='$'v
+		case $SHELL in
+		?*)	KEEP_SHELL=1 ;;
+		esac
+		;;
+	TAR=*)	eval $n='$'v
+		;;
+	TARFLAGS=*)
+		eval $n='$'v
+		;;
+	VPATH=*)eval USER_$n='$'v
+		;;
+	'debug=1')
+		makeflags="$makeflags --debug-symbols"
+		;;
+	'strip=1')
+		makeflags="$makeflags --strip-symbols"
+		;;
+	*=*)	assign="$assign $n='$v'"
+		;;
+	*)	args="$args $i"
+		;;
+	esac
+done
+case $HOSTTYPE in
+*,*)	hostopts $HOSTTYPE ;;
+esac
+case $assign_CCFLAGS in
+?*)	assign="$assign $assign_CCFLAGS"
+esac
+case $CC in
+''|cc)	;;
+*)	export CC ;;
+esac
+
+# Add build type flags via KSH_RELFLAGS, which is used in src/cmd/ksh93/Mamfile.
+# (Avoid using CCFLAGS; setting it would overwrite autodetected optimization flags.)
+ksh_relflags=
+case `git branch 2>/dev/null` in
+'' | *\*\ [0-9]*.[0-9]*)
+	# If we're not on a git branch (tarball) or on a branch that starts
+	# with a number (release branch), then compile as a release version
+	ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_ksh_release" ;;
+*)	# Otherwise, add 8-character git commit hash if available, and if the working dir is clean
+	git_commit=`git status >/dev/null 2>&1 && git diff-index --quiet HEAD && git rev-parse --short=8 HEAD`
+	case $git_commit in
+	????????)
+		ksh_relflags="${ksh_relflags:+$ksh_relflags }-D_AST_git_commit=\\\"$git_commit\\\"" ;;
+	esac
+	unset git_commit ;;
+esac
+case $ksh_relflags in
+?*)	# add the extra flags as an argument to mamake
+	assign="${assign:+$assign }KSH_RELFLAGS=\"\$ksh_relflags\"" ;;
+esac
+
+# Add ksh compile-options via KSH_SHOPTFLAGS.
+SHOPT()
+{
+	case $1 in
+	*=?*)	ksh_shoptflags="${ksh_shoptflags:+$ksh_shoptflags }-DSHOPT_$1" ;;
+	esac
+}
+ksh_shoptflags=
+shopt_sh='src/cmd/ksh93/SHOPT.sh'	# this script calls SHOPT() to set options
+if	test -f "$shopt_sh"
+then	. "$shopt_sh"
+else	echo "WARNING: $shopt_sh is missing" >&2
+fi
+case $ksh_shoptflags in
+?*)	# add the extra flags as an argument to mamake
+	assign="${assign:+$assign }KSH_SHOPTFLAGS=\"\$ksh_shoptflags\"" ;;
+esac
+
+# grab action specific args
+
+case $action in
+admin)	while	:
+	do	case $# in
+		0)	set list
+			break
+			;;
+		esac
+		case $1 in
+		all)	admin_all=1
+			;;
+		db)	case $# in
+			1)	echo $command: $action: $1: db file argument expected >&2
+				exit 1
+				;;
+			esac
+			shift
+			admin_db=$1
+			;;
+		on)	case $# in
+			1)	echo $command: $action: $1: host pattern argument expected >&2
+				exit 1
+				;;
+			esac
+			shift
+			admin_on=$1
+			;;
+		*)	break
+			;;
+		esac
+		shift
+	done
+	admin_action=$1
+	admin_args=$*
+	for i
+	do	case $i in
+		debug|environment|force|never|only|quiet|show|DEBUG)
+			;;
+		*)	admin_action=$i
+			break
+			;;
+		esac
+	done
+	;;
+setup)	PACKAGEROOT=${PWD:-`pwd`}
+	export PACKAGEROOT
+	KEEP_PACKAGEROOT=1
+	;;
+use)	case $1 in
+	.|32|64)case $1 in
+		32|64)	bit=$1 ;;
+		esac
+		shift
+
+		# HOSTTYPE specific setup
+
+		case $HOSTTYPE in
+		win32.*)sys=uwin
+			wow=`uname -i`
+			case $bit in
+			32)	case $HOSTTYPE in
+				*-64)	HOSTTYPE=${HOSTTYPE%-64} ;;
+				esac
+				;;
+			64)	case $HOSTTYPE in
+				*-64)	;;
+				*)	HOSTTYPE=$HOSTTYPE-64 ;;
+				esac
+				case $wow in
+				*/32)	echo $command: cannot build $bit-bit on $wow $sys >&2; exit 2 ;;
+				esac
+				;;
+			esac
+			case $bit in
+			'')	PS1="($sys) " ;;
+			*)	PS1="($sys-$bit) " ;;
+			esac
+
+			$exec umask 002
+			$exec unset MAKESKIP
+
+			$exec export P=$PWD
+			$exec export A=$P/arch/$HOSTTYPE
+
+			$exec export CDPATH=:..:$A/src/cmd:$A/src/lib:$A/src/uwin:$P/lib/package
+			$exec export INSTALLROOT=$A
+			$exec export PACKAGEROOT=$P
+			$exec export PATH=$A/bin:$P/bin:$PATH
+			$exec export PS1="$PS1"
+			$exec export VPATH=$A:$P
+			$exec export nativepp=/usr/lib
+
+			if	test '' != "$INSTALLROOT" -a -d $INSTALLROOT/include/ast
+			then	$exec export PACKAGE_ast=$INSTALLROOT
+			elif	test -d ${PWD%/*}/ast/arch/$HOSTTYPE
+			then	$exec export PACKAGE_ast=${PWD%/*}/ast/arch/$HOSTTYPE
+			fi
+
+			# run the command
+
+			case $# in
+			0)	case $show in
+				':')	$exec exec $SHELL ;;
+				esac
+				;;
+			*)	$exec exec $SHELL -c "$@"
+				;;
+			esac
+			exit
+			;;
+		esac
+		PACKAGEROOT=${PWD:-`pwd`}
+		$show export PACKAGEROOT
+	esac
+	;;
+esac
+
+# true if arg is a valid PACKAGEROOT
+
+packageroot() # dir
+{
+	test -d $1/lib/$command -o -x $1/bin/$command
+}
+
+# true if arg is executable
+
+executable() # [!] command
+{
+	case $1 in
+	'!')	test ! -x "$2" -a ! -x "$2.exe"; return ;;
+	*)	test -x "$1" -o -x "$1.exe"; return ;;
+	esac
+}
+
+# initialize SHELLMAGIC
+# tangible proof of cygwin's disdain for unix (well, this and execrate)
+
+shellmagic()
+{
+	case $SHELLMAGIC in
+	'')	;;
+	-)	if	test -f /emx/bin/sh.exe
+		then	SHELLMAGIC='#!/emx/bin/sh.exe'$nl
+		elif	test -f /bin/env.exe
+		then	SHELLMAGIC='#!/bin/env sh'$nl
+		else	SHELLMAGIC=
+		fi
+		;;
+	esac
+}
+
+# true if arg is executable command on $PATH
+
+onpath() # command
+{
+	_onpath_b=$1
+	case $_onpath_b in
+	/*)	if	executable $_onpath_b
+		then	_onpath_=$_onpath_b
+			return 0
+		fi
+		return 1
+		;;
+	esac
+	IFS=':'
+	set '' $PATH
+	IFS=$ifs
+	shift
+	for _onpath_d
+	do	case $_onpath_d in
+		'')	_onpath_d=. ;;
+		esac
+		if	executable "$_onpath_d/$_onpath_b"
+		then	_onpath_=$_onpath_d/$_onpath_b
+			return 0
+		fi
+	done
+	return 1
+}
+
+# true if no nmake or nmake not from AT&T or nmake too old
+
+nonmake() # nmake
+{
+	_nonmake_version=`( $1 -n -f - 'print $(MAKEVERSION:@/.*AT&T.* //:/-//G:@/.* .*/19960101/)' . ) </dev/null 2>/dev/null || echo 19840919`
+	if	test $_nonmake_version -lt 20001031
+	then	return 0
+	fi
+	return 1
+}
+
+# determine local host attributes
+
+hostinfo() # attribute ...
+{
+	case $DEBUG in
+	1)	set -x ;;
+	esac
+	map=
+	something=
+	path=$PATH
+	for i in $ccs
+	do	PATH=$PATH:$i
+	done
+	for i in $use
+	do	for j in $org
+		do	PATH=$PATH:$i/$j/bin
+		done
+		PATH=$PATH:$i/bin
+	done
+	# LD_LIBRARY_PATH may be out of sync with PATH here
+	case $SED in
+	'')	SED=sed
+		$SED 1d < /dev/null > /dev/null 2>&1 ||
+		for dir in /bin /usr/bin
+		do	if	test -x $dir/$SED
+			then	SED=$dir/$SED
+				break
+			fi
+		done
+		TR=tr
+		$TR < /dev/null > /dev/null 2>&1 ||
+		for dir in /bin /usr/bin
+		do	if	test -x $dir/$TR
+			then	TR=$dir/$TR
+				break
+			fi
+		done
+		;;
+	esac
+	case $PACKAGE_PATH in
+	?*)	for i in `echo $PACKAGE_PATH | $SED 's,:, ,g'`
+		do	PATH=$PATH:$i/bin
+		done
+		;;
+	esac
+
+	# validate the args
+
+	canon=
+	cc=$CC
+	for info
+	do	case $canon in
+		-)	canon=$info
+			;;
+		*)	case $info in
+			*/*|*[cC][cC])
+				cc=$info
+				;;
+			canon)	canon=-
+				something=1
+				;;
+			cpu|name|rating|type)
+				something=1
+				;;
+			*)	echo "$command: $action: $info: unknown attribute" >&2
+				exit 1
+				;;
+			esac
+			;;
+		esac
+	done
+	case $canon in
+	-)	echo "$command: $action: canon: host type name expected" >&2
+		exit 1
+		;;
+	esac
+	case $something in
+	"")	set "$@" type ;;
+	esac
+	case $DEBUG in
+	'')	exec 9>&2
+		exec 2>/dev/null
+		;;
+	esac
+
+	# compute the info
+
+	_hostinfo_=
+	for info
+	do
+	case $info in
+	cpu)	case $NPROC in
+		[123456789]*)
+			_hostinfo_="$_hostinfo_ $NPROC"
+			continue
+			;;
+		esac
+		cpu=`sysctl -n hw.ncpu`
+		case $cpu in
+		[123456789]*)
+			_hostinfo_="$_hostinfo_ $cpu"
+			continue
+			;;
+		esac
+		cpu=`grep -ic '^processor[ 	][ 	]*:[ 	]*[0123456789]' /proc/cpuinfo`
+		case $cpu in
+		[123456789]*)
+			_hostinfo_="$_hostinfo_ $cpu"
+			continue
+			;;
+		esac
+		cpu=1
+		# exact match
+		set							\
+			hinv			'^Processor [0123456789]'	\
+			psrinfo			'on-line'		\
+			'cat /reg/LOCAL_MACHINE/Hardware/Description/System/CentralProcessor'					'.'			\
+			'cat /proc/registry/HKEY_LOCAL_MACHINE/Hardware/Description/System/CentralProcessor'			'.'			\
+
+		while	:
+		do	case $# in
+			0)	break ;;
+			esac
+			i=`$1 2>/dev/null | grep -c "$2"`
+			case $i in
+			[123456789]*)
+				cpu=$i
+				break
+				;;
+			esac
+			shift;shift
+		done
+		case $cpu in
+		0|1)	set						\
+			/bin/mpstat
+
+			while	:
+			do	case $# in
+				0)	break ;;
+				esac
+				if	executable $1
+				then	case `$1 | grep -ic '^cpu '` in
+					1)	cpu=`$1 | grep -ic '^ *[0123456789][0123456789]* '`
+						break
+						;;
+					esac
+				fi
+				shift
+			done
+			;;
+		esac
+		case $cpu in
+		0|1)	# token match
+			set						\
+			/usr/kvm/mpstat			'cpu[0123456789]'	\
+			/usr/etc/cpustatus		'enable'	\
+			/usr/alliant/showsched		'CE'		\
+			'ls /config/hw/system/cpu'	'cpu'		\
+			prtconf				'cpu-unit'	\
+
+			while	:
+			do	case $# in
+				0)	break ;;
+				esac
+				i=`$1 2>/dev/null | $TR ' 	' '
+
+' | grep -c "^$2"`
+				case $i in
+				[123456789]*)
+					cpu=$i
+					break
+					;;
+				esac
+				shift;shift
+			done
+			;;
+		esac
+		case $cpu in
+		0|1)	# special match
+			set						\
+									\
+			hinv						\
+			'/^[0123456789][0123456789]* .* Processors*$/'		\
+			'/[ 	].*//'					\
+									\
+			/usr/bin/hostinfo				\
+			'/^[0123456789][0123456789]* .* physically available\.*$/'	\
+			'/[ 	].*//'					\
+
+			while	:
+			do	case $# in
+				0)	break ;;
+				esac
+				i=`$1 2>/dev/null | $SED -e "${2}!d" -e "s${3}"`
+				case $i in
+				[123456789]*)
+					cpu=$i
+					break
+					;;
+				esac
+				shift;shift;shift
+			done
+			;;
+		esac
+		case $cpu in
+		0|1)	cpu=`(
+			cd "$TMPDIR"
+			tmp=hi$$
+			trap 'rm -f $tmp.*' 0 1 2
+			cat > $tmp.c <<!
+#include <stdio.h>
+#include <pthread.h>
+int main()
+{
+	printf("%d\n", pthread_num_processors_np());
+	return 0;
+}
+!
+			for o in -lpthread ''
+			do	if	$CC $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1 ||
+					gcc $o -O -o $tmp.exe $tmp.c $o >/dev/null 2>&1
+				then	./$tmp.exe
+					break
+				fi
+			done
+			)`
+			case $cpu in
+			[0123456789]*)	;;
+			*)	cpu=1 ;;
+			esac
+			;;
+		esac
+		_hostinfo_="$_hostinfo_ $cpu"
+		;;
+	name)	_name_=`hostname || uname -n || cat /etc/whoami || echo local`
+		_hostinfo_="$_hostinfo_ $_name_"
+		;;
+	rating)	for rating in `grep -i ^bogomips /proc/cpuinfo 2>/dev/null | $SED -e 's,.*:[ 	]*,,' -e 's,\(...*\)\..*,\1,' -e 's,\(\..\).*,\1,'`
+		do	case $rating in
+			[0123456789]*)	break ;;
+			esac
+		done
+		case $rating in
+		[0123456789]*)	;;
+		*)	cd "$TMPDIR"
+			tmp=hi$$
+			trap 'rm -f $tmp.*' 0 1 2
+			cat > $tmp.c <<!
+#include <stdio.h>
+#include <sys/types.h>
+#if TD || TZ
+#include <sys/time.h>
+#else
+extern time_t	time();
+#endif
+int main()
+{
+	register unsigned long	i;
+	register unsigned long	j;
+	register unsigned long	k;
+	unsigned long		l;
+	unsigned long		m;
+	unsigned long		t;
+	int			x;
+#if TD || TZ
+	struct timeval		b;
+	struct timeval		e;
+#if TZ
+	struct timezone		z;
+#endif
+#endif
+	l = 500;
+	m = 890;
+	x = 0;
+	for (;;)
+	{
+#if TD || TZ
+#if TZ
+		gettimeofday(&b, &z);
+#else
+		gettimeofday(&b);
+#endif
+#else
+		t = (unsigned long)time((time_t*)0);
+#endif
+		k = 0;
+		for (i = 0; i < l; i++)
+			for (j = 0; j < 50000; j++)
+				k += j;
+#if TD || TZ
+#if TZ
+		gettimeofday(&e, &z);
+#else
+		gettimeofday(&e);
+#endif
+		t = (e.tv_sec - b.tv_sec) * 1000 + (e.tv_usec - b.tv_usec) / 1000;
+		if (!x++ && t < 1000)
+		{
+			t = 10000 / t;
+			l = (l * t) / 10;
+			continue;
+		}
+#else
+		t = ((unsigned long)time((time_t*)0) - t) * 1000;
+		if (!x++ && t < 20000)
+		{
+			t = 200000l / t;
+			l = (l * t) / 10;
+			continue;
+		}
+#endif
+#if PR
+		printf("[ k=%lu l=%lu m=%lu t=%lu ] ", k, l, m, t);
+#endif
+		if (t == 0)
+			t = 1;
+		break;
+	}
+	printf("%lu\n", ((l * m) / 10) / t);
+	return k == 0;
+}
+!
+			rating=
+			for o in -DTZ -DTD ''
+			do	if	$CC $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1 ||
+					gcc $o -O -o $tmp.exe $tmp.c >/dev/null 2>&1
+				then	rating=`./$tmp.exe`
+					break
+				fi
+			done
+			case $rating in
+			[0123456789]*)	;;
+			*)	rating=1 ;;
+			esac
+			;;
+		esac
+		_hostinfo_="$_hostinfo_ $rating"
+		;;
+	type|canon)
+		case $CROSS:$canon in
+		0:)	case $cc in
+			cc)	case $KEEP_HOSTTYPE:$HOSTTYPE in
+				0:?*)	if	test -d ${PACKAGEROOT:-.}/arch/$HOSTTYPE
+					then	KEEP_HOSTTYPE=1
+					fi
+					;;
+				esac
+				;;
+			esac
+			case $KEEP_HOSTTYPE in
+			1)	_hostinfo_="$_hostinfo_ $HOSTTYPE"
+				continue
+				;;
+			esac
+			;;
+		esac
+		case $cc in
+		/*)	a=`$cc -dumpmachine $CCFLAGS 2>/dev/null`
+			case $a in
+			'')	case $CCFLAGS in
+				?*)	a=`$cc -dumpmachine 2>/dev/null` ;;
+				esac
+				;;
+			esac
+			case $a in
+			''|*' '*|*/*:*)
+				;;
+			*.*-*)	_hostinfo_="$_hostinfo_ $a"
+				continue
+				;;
+			*-*-*)	case $canon in
+				'')	canon=$a ;;
+				esac
+				;;
+			*)	_hostinfo_="$_hostinfo_ $a"
+				continue
+				;;
+			esac
+			;;
+		esac
+		IFS=:
+		set /$IFS$PATH
+		IFS=$ifs
+		shift
+		f=../lib/hostinfo/typemap
+		for i
+		do	case $i in
+			"")	i=. ;;
+			esac
+			case $canon in
+			'')	case $cc in
+				/*|cc)	;;
+				*)	if	executable $i/$cc
+					then	a=`$i/$cc -dumpmachine $CCFLAGS 2>/dev/null`
+						case $a in
+						'')	case $CCFLAGS in
+							?*)	a=`$cc -dumpmachine 2>/dev/null` ;;
+							esac
+							;;
+						esac
+						case $a in
+						''|*' '*|*/*:*)
+							;;
+						*-*)	canon=$a
+							;;
+						*)	_hostinfo_="$_hostinfo_ $a"
+							continue 2
+							;;
+						esac
+					fi
+					;;
+				esac
+				;;
+			esac
+			if	test -f "$i/$f"
+			then	map="`grep -v '^#' $i/$f` $map"
+			fi
+		done
+
+		# inconsistent -dumpmachine filtered here
+
+		case -${canon}- in
+		--|*-powerpc-*)
+			h=`hostname || uname -n || cat /etc/whoami`
+			case $h in
+			'')	h=local ;;
+			esac
+			a=`arch || uname -m || att uname -m || uname -s || att uname -s`
+			case $a in
+			*[\ \	]*)	a=`echo $a | $SED "s/[ 	]/-/g"` ;;
+			esac
+			case $a in
+			'')	a=unknown ;;
+			esac
+			m=`mach || machine || uname -p || att uname -p`
+			case $m in
+			*[\ \	]*)	m=`echo $m | $SED "s/[ 	]/-/g"` ;;
+			esac
+			case $m in
+			'')	m=unknown ;;
+			esac
+			x=`uname -a || att uname -a`
+			case $x in
+			'')	x="unknown $host unknown unknown unknown unknown unknown" ;;
+			esac
+			set "" $h $a $m $x
+			expected=$1 host=$2 arch=$3 mach=$4 os=$5 sys=$6 rel=$7 ver=$8
+			;;
+		*)	case $canon in
+			*-*)	IFS=-
+				set "" $canon
+				shift
+				IFS=$ifs
+				case $# in
+				2)	host= mach= arch=$1 os=$2 sys= rel= ;;
+				*)	host= mach=$2 arch=$1 os=$3 sys= rel= ;;
+				esac
+				case $os in
+				[abcdefghijklmnopqrstuvwxyz]*[0123456789])
+					eval `echo $os | $SED -e 's/^\([^0123456789.]*\)\.*\(.*\)/os=\1 rel=\2/'`
+					;;
+				esac
+				;;
+			*)	arch=$canon mach= os= sys= rel=
+				;;
+			esac
+			;;
+		esac
+		type=unknown
+		case $host in
+		*.*)	host=`echo $host | $SED -e 's/\..*//'` ;;
+		esac
+		case $mach in
+		unknown)
+			mach=
+			;;
+		[Rr][0123][0123456789][0123456789][0123456789])
+			mach=mips1
+			;;
+		[Rr][4][0123456789][0123456789][0123456789])
+			mach=mips2
+			;;
+		[Rr][56789][0123456789][0123456789][0123456789]|[Rr][123456789][0123456789][0123456789][0123456789][0123456789])
+			mach=mips4
+			;;
+		pc)	arch=i386
+			mach=
+			;;
+		[Pp][Oo][Ww][Ee][Rr][Pp][Cc])
+			arch=ppc
+			mach=
+			;;
+		*)	case $arch in
+			34[0123456789][0123456789])
+				os=ncr
+				arch=i386
+				;;
+			esac
+			;;
+		esac
+		case $canon in
+		'')	set						\
+									\
+			/NextDeveloper		-d	next	-	\
+			/config/hw/system/cpu	-d	tandem	mach	\
+
+			while	:
+			do	case $# in
+				0)	break ;;
+				esac
+				if	test $2 $1
+				then	os=$3
+					case $4 in
+					arch)	mach=$arch ;;
+					mach)	arch=$mach ;;
+					esac
+					break
+				fi
+				shift;shift;shift;shift
+			done
+			;;
+		esac
+		case $os in
+		AIX*|aix*)
+			type=ibm.risc
+			;;
+		HP-UX)	case $arch in
+			9000/[78]*)
+				type=hp.pa
+				;;
+			*/*)	type=hp.`echo $arch | $SED 's,/,_,g'`
+				;;
+			*)	type=hp.$arch
+				;;
+			esac
+			;;
+		[Ii][Rr][Ii][Xx]*)
+			set xx `hinv | $SED -e '/^CPU:/!d' -e 's/CPU:[ 	]*\([^ 	]*\)[ 	]*\([^ 	]*\).*/\1 \2/' -e q | $TR ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+			shift
+			type=$1
+			n=
+			case $2 in
+			r[0123][0123456789][0123456789][0123456789])
+				n=1
+				;;
+			r[4][0123][0123456789][0123456789])
+				n=2
+				;;
+			r[4][456789][0123456789][0123456789]|r[5][0123456789][0123456789][0123456789])
+				n=3
+				;;
+			r[6789][0123456789][0123456789][0123456789]|r[123456789][0123456789][0123456789][0123456789][0123456789])
+				n=4
+				;;
+			esac
+			case $rel in
+			[01234].*|5.[012]|5.[012].*)
+				case $n in
+				1)	;;
+				*)	n=2 ;;
+				esac
+				;;
+			5.*)	case $n in
+				2)	n=3 ;;
+				esac
+				;;
+			esac
+			if	executable $cc
+			then	a=$cc
+			else	IFS=:
+				set /$IFS$PATH
+				IFS=$ifs
+				shift
+				for i
+				do	a=$i/$cc
+					if	executable $a
+					then	break
+					fi
+				done
+			fi
+			split='
+'
+			a=`strings $a < /dev/null | $SED -e 's/[^abcdefghijklmnopqrstuvwxyz0123456789]/ /g' -e 's/[ 	][ 	]*/\'"$split"'/g' | $SED -e "/^${type}[0123456789]$/!d" -e "s/^${type}//" -e q`
+			case $a in
+			[0123456789])	n=$a ;;
+			esac
+			case $n in
+			4)	a=`$cc -${type}3 2>&1`
+				case $a in
+				*unknown*|*install*|*conflict*)
+					;;
+				*)	n=3
+					;;
+				esac
+				;;
+			esac
+			a=`$cc -show F0oB@r.c 2>&1`
+			case $n:$a in
+			[!2]:*mips2*)	n=2 ;;
+			[!23]:*mips3*)	n=3 ;;
+			[!234]:*mips4*)	n=4 ;;
+			esac
+			case $n:$a in
+			[!2]:*[Oo]32*)	abi=-o32 ;;
+			[!3]:*[Nn]32*)	abi=-n32 ;;
+			esac
+			mach=${type}$n
+			type=sgi.$mach
+			;;
+		OSx*|SMP*|pyramid)
+			type=pyr
+			;;
+		OS/390)	type=mvs.390
+			;;
+		[Ss][Cc][Oo]*)
+			type=sco
+			;;
+		[Ss]ol*)
+			v=`echo $rel | $SED -e 's/^[25]\.//' -e 's/\.[^.]*$//'`
+			case $v in
+			[6789]|[1-9][0-9])
+				;;
+			*)	v=
+				;;
+			esac
+			case $arch in
+			'')	case $mach in
+				'')	arch=sun4 ;;
+				*)	arch=$mach ;;
+				esac
+				;;
+			esac
+			case $arch in
+			sparc)	arch=sun4 ;;
+			esac
+			type=sol$v.$arch
+			;;
+		[Ss]un*)type=`echo $arch | $SED -e 's/\(sun.\).*/\1/'`
+			case $type in
+			sparc)	type=sun4 ;;
+			esac
+			case $rel in
+			[01234]*)
+				;;
+			'')	case $os in
+				*[Oo][Ss])
+					;;
+				*)	type=sol.$type
+					;;
+				esac
+				;;
+			*)	case $type in
+				'')	case $mach in
+					sparc*)	type=sun4 ;;
+					*)	type=$mach ;;
+					esac
+					;;
+				esac
+				v=`echo $rel | $SED -e 's/^[25]\.//' -e 's/\.[^.]*$//'`
+				case $v in
+				[6789]|[1-9][0-9])
+					;;
+				*)	v=
+					;;
+				esac
+				type=sol$v.$type
+				;;
+			esac
+			case $type in
+			sun*|*.*)
+				;;
+			*)	type=sun.$type
+				;;
+			esac
+			;;
+		[Uu][Nn][Ii][Xx]_[Ss][Vv])
+			type=unixware
+			;;
+		UTS*|uts*)
+			if	test -x /bin/u370 -o -x /bin/u390
+			then	type=uts.390
+			else	case $arch in
+				'')	arch=$mach ;;
+				esac
+				type=uts.$arch
+			fi
+			;;
+		$host)	type=$arch
+			case $type in
+			*.*|*[0123456789]*86|*68*)
+				;;
+			*)	case $mach in
+				*[0123456789]*86|*68*|mips)
+					type=$type.$mach
+					;;
+				esac
+				;;
+			esac
+			;;
+		unknown)
+			case $arch in
+			?*)	case $arch in
+				sun*)	mach= ;;
+				esac
+				type=$arch
+				case $mach in
+				?*)	type=$type.$mach ;;
+				esac
+				;;
+			esac
+			;;
+		*)	case $ver in
+			FTX*|ftx*)
+				case $mach in
+				*[0123456789][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
+					mach=`echo $mach | $SED -e 's/[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ]*$//'`
+					;;
+				esac
+				type=stratus.$mach
+				;;
+			*)	case $arch in
+				[Oo][Ss][-/.]2)
+					type=os2
+					arch=$rel
+					;;
+				*)	type=`echo $os | $SED -e 's/[0123456789].*//' -e 's/[^ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_0123456789.].*//'`
+					;;
+				esac
+				case $type in
+				[Cc][Yy][Gg][Ww][Ii][Nn]_*)
+					type=cygwin
+					;;
+				[Uu][Ww][Ii][Nn]*|[Ww]indows_[0123456789][0123456789]|[Ww]indows_[Nn][Tt])
+					type=win32
+					arch=`echo $arch | $SED -e 's/_[^_]*$//'`
+					;;
+				esac
+				case $arch in
+				'')	case $mach in
+					?*)	type=$type.$mach ;;
+					esac
+					;;
+				*)	type=$type.$arch ;;
+				esac
+				;;
+			esac
+		esac
+		case $type in
+		[0123456789]*)
+			case $mach in
+			?*)	type=$mach ;;
+			esac
+			case $type in
+			*/MC)	type=ncr.$type ;;
+			esac
+			;;
+		*.*)	;;
+		*[0123456789]*86|*68*)
+			case $rel in
+			[34].[0123456789]*)
+				type=att.$type
+				;;
+			esac
+			;;
+		[abcdefghijklmnopqrstuvwxyz]*[0123456789])
+			;;
+		[abcdefghijklmnopqrstuvwxyz]*)	case $mach in
+			$type)	case $ver in
+				Fault*|fault*|FAULT*)
+					type=ft.$type
+					;;
+				esac
+				;;
+			?*)	case $arch in
+				'')	type=$type.$mach ;;
+				*)	type=$type.$arch ;;
+				esac
+				;;
+			esac
+			;;
+		esac
+		case $type in
+		*[-_]32|*[-_]64|*[-_]128)
+			bits=`echo $type | $SED 's,.*[-_],,'`
+			type=`echo $type | $SED 's,[-_][0-9]*$,,'`
+			;;
+		*)	bits=
+			;;
+		esac
+		type=`echo $type | $SED -e 's%[-+/].*%%' | $TR ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`
+		case $type in
+		*.*)	lhs=`echo $type | $SED -e 's/\..*//'`
+			rhs=`echo $type | $SED -e 's/.*\.//'`
+			case $rhs in
+			[x0123456789]*86)	rhs=i$rhs ;;
+			68*)			rhs=m$rhs ;;
+			esac
+			case $rhs in
+			i[x23456789]86|i?[x23456789]86|*86pc)
+						rhs=i386 ;;
+			powerpc)		rhs=ppc ;;
+			s[0123456789]*[0123456789]x)
+						rhs=`echo $rhs | $SED -e 's/x$/-64/'` ;;
+			esac
+			case $rhs in
+			arm[abcdefghijklmnopqrstuvwxyz_][0123456789]*)
+						rhs=arm ;;
+			hppa)			rhs=pa ;;
+			esac
+			case $lhs in
+			?*coff|?*dwarf|?*elf)
+				case $lhs in
+				?*coff)	x=coff ;;
+				?*dwarf)x=coff ;;
+				?*elf)	x=elf ;;
+				esac
+				lhs=`echo ${lhs}XXX | $SED -e "s/${x}XXX//"`
+				;;
+			esac
+			case $lhs in
+			bsdi)			lhs=bsd ;;
+			darwin)			case `/usr/bin/cc --version` in
+						*'(GCC)'*)	case $rel in
+								[0-9].*|10.*)	lhs=darwin07 ;;
+								*)		lhs=darwin11 ;;
+								esac ;;
+						esac
+						;;
+			freebsd)		case $rel in
+						[01234].*)	lhs=${lhs}4 ;;
+						[123456789]*.*)	lhs=${lhs}`echo $rel | $SED -e 's/\..*//'` ;;
+						esac
+						;;
+			hpux)			lhs=hp ;;
+			mvs)			rhs=390 ;;
+			esac
+			case $lhs in
+			'')			type=$rhs ;;
+			$rhs)			type=$lhs ;;
+			*)			type=$lhs.$rhs ;;
+			esac
+			;;
+		esac
+		case $type in
+		sgi.mips*)
+			case $mach in
+			mips2)	type=sgi.$mach
+				abi=-o32
+				;;
+			mips3)	type=sgi.$mach
+				abi=-n32
+				;;
+			mips[456789])
+				type=sgi.$mach
+				case $abi in
+				*-n32) ;;
+				*) abi=-64 ;;
+				esac
+				;;
+			*)	pwd=`pwd`
+				cd "$TMPDIR"
+				tmp=hi$$
+				trap 'rm -f $tmp.*' 0 1 2
+				cat > $tmp.a.c <<!
+extern int b();
+int main() { return b(); }
+!
+				cat > $tmp.b.c <<!
+int b() { return 0; }
+!
+				abi=
+				if	$cc -c $tmp.a.c
+				then	for i in -n32 -o32 -64
+					do	if	$cc $i -c $tmp.b.c &&
+							$cc -o $tmp.exe $tmp.a.o $tmp.b.o
+						then	abi=$i
+							for i in 2 3 4 5 6 7 8 9
+							do	case $i:$abi in
+								2:-n32|2:-64|3:-64)
+									continue
+									;;
+								esac
+								if	$cc $abi -mips$i -c $tmp.b.c &&
+									$cc -o $tmp.exe $tmp.a.o $tmp.b.o
+								then	type=`echo $type | $SED -e 's/.$//'`$i
+									break
+								fi
+							done
+							break
+						fi
+					done
+				fi </dev/null >/dev/null 2>&1
+				rm -f $tmp.*
+				trap - 0 1 2
+				cd $pwd
+				;;
+			esac
+			case $type$abi in
+			sgi.mips2-o32)
+				;;
+			sgi.mips3)
+				type=$type-o32
+				;;
+			sgi.mips3-n32)
+				;;
+			sgi.mips4)
+				type=$type-o32
+				;;
+			sgi.mips[456789]-64)
+				;;
+			*)	type=$type$abi
+				;;
+			esac
+			;;
+		*)	case $bits in
+			'')	bits=`	cd "$TMPDIR"
+					tmp=hi$$
+					trap 'rm -f $tmp.*' 0 1 2
+					echo 'int main() { return 0; }' > $tmp.a.c
+					$cc $CCFLAGS -o $tmp.a.exe $tmp.a.c </dev/null >/dev/null 2>&1
+					file $tmp.a.exe 2>/dev/null | sed "s/$tmp\.a\.exe//g"  `
+				case $bits in
+				*64*)	bits=64 ;;
+				*)	bits= ;;
+				esac
+				;;
+			esac
+			;;
+		esac
+		case $bits in
+		32)	case $type in
+			*.i386)	bits= ;;
+			esac
+			;;
+		esac
+		case $bits in
+		?*)	type=$type-$bits ;;
+		esac
+
+		# last chance mapping
+
+		set "" "" $map
+		while	:
+		do	case $# in
+			[012])	break ;;
+			esac
+			shift;shift
+			eval "	case \$type in
+				$1)	type=\$2; break ;;
+				esac"
+		done
+		_hostinfo_="$_hostinfo_ $type"
+		;;
+	esac
+	done
+	set '' $_hostinfo_
+	shift
+	_hostinfo_=$*
+
+	# restore the global state
+
+	PATH=$path
+	case $DEBUG in
+	'')	exec 2>&9
+		exec 9>&-
+		;;
+	esac
+}
+
+# info message
+
+note() # message ...
+{
+	echo $command: "$@" >&2
+}
+
+# cc checks
+#
+#	CC: compiler base name name
+#	cc: full path, empty if not found
+
+checkcc()
+{
+	cc=
+	if	onpath $CC
+	then	cc=$_onpath_
+	else	case $CC in
+		cc)	if	onpath gcc
+			then	CC=gcc
+				cc=$_onpath_
+			fi
+			;;
+		esac
+	fi
+	case $cc in
+	'')	case $action in
+		make|test)	note "$CC: not found"; exit 1 ;;
+		*)		note "warning: $CC: not found" ;;
+		esac
+		;;
+	esac
+}
+
+# some actions have their own PACKAGEROOT or kick out early
+
+case $action in
+host)	eval u=$package_use
+	case $u in
+	$PACKAGE_USE)
+		;;
+	*)	if	onpath $0
+		then	case $_onpath_ in
+			*/arch/$HOSTTYPE/bin/package)
+				KEEP_HOSTTYPE=1
+				;;
+			*)	KEEP_HOSTTYPE=0
+				;;
+			esac
+		else	KEEP_HOSTTYPE=0
+		fi
+		;;
+	esac
+	hostinfo $args
+	echo $_hostinfo_
+	exit 0
+	;;
+export|setup|use)
+	x=
+	;;
+*)	x=
+	eval u=$package_use
+	case $u in
+	$PACKAGE_USE)
+		case :$PATH: in
+		*:$INSTALLROOT/bin:*)
+			case $LIBPATH: in
+			$INSTALLROOT/bin:$INSTALLROOT/lib:*)
+				case $SHLIB_PATH: in
+				$INSTALLROOT/lib:*)
+					x=1
+					;;
+				esac
+				;;
+			esac
+			;;
+		esac
+		;;
+	esac
+	;;
+esac
+run=-
+case $x in
+1)	: accept the current package use environment
+
+	OK=ok
+	KSH=$EXECROOT/bin/ksh
+	MAKE=nmake
+	NMAKE=$EXECROOT/bin/$MAKE
+	SUM=$EXECROOT/bin/sum
+	TEE=$EXECROOT/bin/tee
+	INITROOT=$PACKAGEROOT/src/cmd/INIT
+	checkcc
+	;;
+*)	hosttype=
+	case $KEEP_PACKAGEROOT in
+	0)	case $action in
+		use)	PACKAGEROOT=
+			case $show in
+			echo)	exec=echo make=echo show=echo ;;
+			esac
+			set '' $args
+			shift
+			case $# in
+			0)	;;
+			*)	case $1 in
+				-|.)	;;
+				/*)	PACKAGEROOT=$1
+					;;
+				*)	i=`echo ~$1`
+					if	packageroot $i
+					then	PACKAGEROOT=$i
+					else	for i in `echo $HOME | sed -e 's,/[^/]*$,,'` $usr $use
+						do	if	packageroot $i/$1
+							then	PACKAGEROOT=$i/$1
+								break
+							fi
+						done
+						case $PACKAGEROOT in
+						'')	hosttype=$1 ;;
+						esac
+					fi
+					;;
+				esac
+				shift
+				;;
+			esac
+			run="$@"
+			;;
+		esac
+		case $PACKAGEROOT in
+		'')	PACKAGEROOT=${PWD:-`pwd`} ;;
+		esac
+
+		# . must be within the PACKAGEROOT tree
+
+		i=X$PACKAGEROOT
+		IFS=/
+		set $i
+		IFS=$ifs
+		while	:
+		do	i=$1
+			shift
+			case $i in
+			X)	break ;;
+			esac
+		done
+		case $PACKAGEROOT in
+		//*)	d=/ ;;
+		*)	d= ;;
+		esac
+		case $1 in
+		home)	k=1 ;;
+		*)	k=0 ;;
+		esac
+		for i
+		do	case $i in
+			'')	continue ;;
+			esac
+			d=$d/$i
+			case $k in
+			2)	k=1
+				;;
+			1)	k=0
+				;;
+			0)	case $i in
+				arch)	k=2
+					;;
+				*)	if	packageroot $d
+					then	PACKAGEROOT=$d
+					fi
+					;;
+				esac
+				;;
+			esac
+		done
+		;;
+	esac
+	INITROOT=$PACKAGEROOT/src/cmd/INIT
+	$show PACKAGEROOT=$PACKAGEROOT
+	$show export PACKAGEROOT
+	export PACKAGEROOT
+
+	# initialize the architecture environment
+
+	case $KEEP_HOSTTYPE in
+	0)	hostinfo type
+		HOSTTYPE=$_hostinfo_
+		;;
+	1)	_PACKAGE_HOSTTYPE_=$HOSTTYPE
+		export _PACKAGE_HOSTTYPE_
+		;;
+	esac
+	$show HOSTTYPE=$HOSTTYPE
+	$show export HOSTTYPE
+	export HOSTTYPE
+	INSTALLROOT=$PACKAGEROOT/arch/$HOSTTYPE
+	case $action in
+	admin|install|make|read|remove|test|verify|view|write)
+		;;
+	*)	if	test ! -d $INSTALLROOT
+		then	INSTALLROOT=$PACKAGEROOT
+		fi
+		;;
+	esac
+	$show INSTALLROOT=$INSTALLROOT
+	$show export INSTALLROOT
+	export INSTALLROOT
+
+	# check the basic package hierarchy
+
+	case $action in
+	export|use)
+		packageroot $PACKAGEROOT || {
+			echo "$command: $PACKAGEROOT: invalid package root directory" >&2
+			exit 1
+		}
+		case $KEEP_HOSTTYPE:$hosttype in
+		0:?*)	if	test -d ${PACKAGEROOT:-.}/arch/$hosttype
+			then	KEEP_HOSTTYPE=1
+				HOSTTYPE=$hosttype
+			else	echo "$command: $hosttype: package root not found" >&2
+				exit 1
+			fi
+			;;
+		esac
+		;;
+	*)	packageroot $PACKAGEROOT || {
+			case $KEEP_PACKAGEROOT in
+			1)	;;
+			*)	echo "$command: $PACKAGEROOT: must be in the package root directory tree" >&2
+				exit 1
+				;;
+			esac
+		}
+
+		case $action in
+		admin)	;;
+		*)	for i in arch arch/$HOSTTYPE
+			do	test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+			done
+			for i in lib
+			do	test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+			done
+			;;
+		esac
+
+		# no $INITROOT means INIT already installed elsewhere
+
+		if	test -d $INITROOT
+		then
+			# update the basic package commands
+
+			for i in execrate ignore mamprobe silent
+			do	test -h $PACKAGEROOT/bin/$i 2>/dev/null ||
+				case `ls -t $INITROOT/$i.sh $PACKAGEROOT/bin/$i 2>/dev/null` in
+				"$INITROOT/$i.sh"*)
+					note update $PACKAGEROOT/bin/$i
+					shellmagic
+					case $SHELLMAGIC in
+					'')	$exec cp $INITROOT/$i.sh $PACKAGEROOT/bin/$i || exit
+						;;
+					*)	case $exec in
+						'')	{
+							echo "$SHELLMAGIC"
+							cat $INITROOT/$i.sh
+							} > $PACKAGEROOT/bin/$i || exit
+							;;
+						*)	echo "{
+echo \"$SHELLMAGIC\"
+cat $INITROOT/$i.sh
+} > $PACKAGEROOT/bin/$i"
+							;;
+						esac
+						;;
+					esac
+					$exec chmod +x $PACKAGEROOT/bin/$i || exit
+					;;
+				esac
+			done
+		fi
+		;;
+	esac
+	path=$PATH
+	PATH=$INSTALLROOT/bin:$PACKAGEROOT/bin:$PATH
+	checkcc
+	PATH=$path
+	case $cc in
+	?*)	if	test -f $INITROOT/hello.c
+		then
+			# check if $CC (full path $cc) is a cross compiler
+
+			(
+				cd "$TMPDIR" || exit 3
+				cp $INITROOT/hello.c pkg$$.c || exit 3
+				$cc -o pkg$$.exe pkg$$.c > pkg$$.e 2>&1 || {
+					if $cc -Dnew=old -o pkg$$.exe pkg$$.c > /dev/null 2>&1
+					then	echo "$command: ${warn}$CC: must be a C compiler (not C++)" >&2
+					else	cat pkg$$.e
+						echo "$command: ${warn}$CC: failed to compile and link $INITROOT/hello.c -- is it a C compiler?" >&2
+					fi
+					exit 2
+				}
+				if ./pkg$$.exe >/dev/null 2>&1
+				then	code=0
+				else	code=1
+				fi
+				rm -f pkg$$.*
+				exit $code
+			)
+			code=$?
+			case $code in
+			1)	CROSS=1 ;;
+			esac
+		fi
+		;;
+	esac
+	EXECTYPE=$HOSTTYPE
+	EXECROOT=$INSTALLROOT
+	case $CROSS in
+	0) 	# dll hackery -- why is this so complicated?
+
+		abi=
+		case $HOSTTYPE in
+		sgi.mips[0123456789]*)
+			x=rld
+			if	executable /lib32/$x || executable /lib64/$x
+			then	case $INSTALLROOT in
+				*/sgi.mips[0123456789]*)
+					u=`echo $INSTALLROOT | sed -e 's,-[^-/]*$,,' -e 's,.$,,'`
+					;;
+				*)	u=
+					;;
+				esac
+				for a in "n=2 v= l=" "n=3 v=N32 l=lib32" "n=4-n32 v=N32 l=lib32" "n=4 v=64 l=lib64"
+				do	eval $a
+					case $v in
+					N32)	case $n:$HOSTTYPE in
+						*-n32:*-n32)	;;
+						*-n32:*)	continue ;;
+						*:*-n32)	continue ;;
+						esac
+						;;
+					esac
+					case $l in
+					?*)	if	executable ! /$l/$x
+						then	continue
+						fi
+						;;
+					esac
+					case $u in
+					'')	case $HOSTTYPE in
+						sgi.mips$n|sgi.mips$n-*)
+							abi="$abi 'd=$INSTALLROOT v=$v'"
+							;;
+						*)	continue
+							;;
+						esac
+						;;
+					*)	if	test -d $u$n
+						then	abi="$abi 'd=$u$n v=$v'"
+						fi
+						;;
+					esac
+				done
+			fi
+			;;
+		esac
+		case $abi in
+		'')	abi="'d=$INSTALLROOT v='" ;;
+		esac
+		p=0
+		eval "
+			for a in $abi
+			do	eval \$a
+				eval \"
+					case \\\$LD_LIBRARY\${v}_PATH: in
+					\\\$d/lib:*)
+						;;
+					*)	x=\\\$LD_LIBRARY\${v}_PATH
+						case \\\$x in
+						''|:*)	;;
+						*)	x=:\\\$x ;;
+						esac
+						LD_LIBRARY\${v}_PATH=\$d/lib\\\$x
+						export LD_LIBRARY\${v}_PATH
+						p=1
+						;;
+					esac
+				\"
+			done
+		"
+		case $LD_LIBRARY_PATH in
+		'')	;;
+		*)	for d in $lib
+			do	case $HOSTTYPE in
+				*64)	if	test -d ${d}64
+					then	d=${d}64
+					fi
+					;;
+				esac
+				case :$LD_LIBRARY_PATH: in
+				*:$d:*)	;;
+				*)	if	test -d $d
+					then	LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$d
+						p=1
+					fi
+					;;
+				esac
+			done
+			;;
+		esac
+		case $p in
+		1)	$show LD_LIBRARY_PATH=$LD_LIBRARY_PATH
+			$show export LD_LIBRARY_PATH
+			export LD_LIBRARY_PATH
+			;;
+		esac
+		case $LIBPATH: in
+		$INSTALLROOT/bin:$INSTALLROOT/lib:*)
+			;;
+		*)	case $LIBPATH in
+			'')	LIBPATH=/usr/lib:/lib ;;
+			esac
+			LIBPATH=$INSTALLROOT/bin:$INSTALLROOT/lib:$LIBPATH
+			$show LIBPATH=$LIBPATH
+			$show export LIBPATH
+			export LIBPATH
+			;;
+		esac
+		case $SHLIB_PATH: in
+		$INSTALLROOT/lib:*)
+			;;
+		*)	SHLIB_PATH=$INSTALLROOT/lib${SHLIB_PATH:+:$SHLIB_PATH}
+			$show SHLIB_PATH=$SHLIB_PATH
+			$show export SHLIB_PATH
+			export SHLIB_PATH
+			;;
+		esac
+		case $DYLD_LIBRARY_PATH: in
+		$INSTALLROOT/lib:*)
+			;;
+		*)	DYLD_LIBRARY_PATH=$INSTALLROOT/lib${DYLD_LIBRARY_PATH:+:$DYLD_LIBRARY_PATH}
+			$show DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH
+			$show export DYLD_LIBRARY_PATH
+			export DYLD_LIBRARY_PATH
+			;;
+		esac
+		case $_RLD_ROOT in
+		$INSTALLROOT/arch*)	;;
+		':')	_RLD_ROOT=$INSTALLROOT/arch:/ ;;
+		/|*:/)	_RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT ;;
+		*)	_RLD_ROOT=$INSTALLROOT/arch:$_RLD_ROOT:/ ;;
+		esac
+		$show _RLD_ROOT=$_RLD_ROOT
+		$show export _RLD_ROOT
+		export _RLD_ROOT
+
+		# now set up PATH
+		#
+		# NOTE: PACKAGEROOT==INSTALLROOT is possible for binary installations
+
+		case $PATH: in
+		$PACKAGEROOT/bin:*)
+			;;
+		*)	PATH=$PACKAGEROOT/bin:$PATH
+			;;
+		esac
+		case $PATH: in
+		$INSTALLROOT/bin:*)
+			;;
+		*)	PATH=$INSTALLROOT/bin:$PATH
+			;;
+		esac
+		$show PATH=$PATH
+		$show export PATH
+		export PATH
+		;;
+	*)	for i in package proto nmake
+		do	if	onpath $i
+			then	EXECROOT=`echo $_onpath_ | sed -e 's,//*[^/]*//*[^/]*$,,'`
+				EXECTYPE=`echo $EXECROOT | sed -e 's,.*/,,'`
+				break
+			fi
+		done
+		case $HOSTTYPE in
+		$EXECTYPE)
+			OCC=$CC
+			CC=cc
+			hostinfo type
+			EXECTYPE=$_hostinfo_
+			case $HOSTTYPE in
+			$EXECTYPE)
+				echo "$command: $CC: seems to be a cross-compiler" >&2
+				echo "$command: set HOSTTYPE to something other than the native $EXECTYPE" >&2
+				echo "$command: If not, your $TMPDIR directory may be mounted without execute permission." >&2
+				echo "$command: Try exporting TMPDIR as a directory where you can execute binary files." >&2
+				exit 1
+				;;
+			esac
+			;;
+		esac
+		$show EXECTYPE=$EXECTYPE
+		$show export EXECTYPE
+		export EXECTYPE
+		;;
+	esac
+	$show EXECROOT=$EXECROOT
+	$show export EXECROOT
+	export EXECROOT
+
+	# use these if possible
+
+	OK=ok
+	KSH=$EXECROOT/bin/ksh
+	MAKE=nmake
+	NMAKE=$EXECROOT/bin/$MAKE
+	SUM=$EXECROOT/bin/sum
+	TEE=$EXECROOT/bin/tee
+
+	# grab a decent default shell
+
+	checksh "$SHELL" || KEEP_SHELL=0
+	case $KEEP_SHELL in
+	0)	save_PATH=$PATH
+		if	PATH=`getconf PATH 2>/dev/null`
+		then	PATH=$PATH:$path
+		else	PATH=/bin:/usr/bin:/sbin:/usr/sbin:$path
+		fi
+		for i in ksh ksh93 mksh yash bash sh
+		do	if onpath "$i" && checksh "$_onpath_"
+			then	SHELL=$_onpath_
+				KEEP_SHELL=1
+				break
+			fi
+		done
+		PATH=$save_PATH
+		unset save_PATH
+		case $KEEP_SHELL in
+		0)	echo "Cannot find good default shell, please supply SHELL=/path/to/shell" >&2
+			exit 1 ;;
+		esac
+		;;
+	esac
+	export SHELL
+	$show SHELL=$SHELL
+	$show export SHELL
+
+	# tame the environment
+
+	case $action in
+	use)	;;
+	*)	ENV=
+		ERROR_OPTIONS=
+		export ENV ERROR_OPTIONS
+		;;
+	esac
+
+	# finalize the views
+
+	case $USER_VPATH in
+	'')	case $VPATH in
+		?*)	IFS=':'
+			set '' $VPATH
+			shift
+			IFS=$ifs
+			USER_VPATH=
+			for i
+			do	case $i in
+				*/arch/$HOSTTYPE)	;;
+				*/arch/*/*)		;;
+				*/arch/*)		continue ;;
+				esac
+				if	packageroot $i
+				then	case $USER_VPATH in
+					'')	USER_VPATH=$i ;;
+					?*)	USER_VPATH=$USER_VPATH:$i ;;
+					esac
+				fi
+			done
+		esac
+		;;
+	esac
+	case $USER_VPATH in
+	?*)	IFS=':'
+		set '' $USER_VPATH
+		shift
+		IFS=$ifs
+		USER_VPATH=
+		USER_VPATH_CHAIN=
+		p=$PACKAGEROOT
+		for i
+		do	case $i in
+			''|$PACKAGEROOT|$INSTALLROOT)
+				;;
+			?*)	USER_VPATH=$USER_VPATH:$i
+				USER_VPATH_CHAIN="$USER_VPATH_CHAIN $p $i"
+				p=$i
+				case $PROTOROOT in
+				-)	executable $i/bin/mamake && PROTOROOT= ;;
+				esac
+				;;
+			esac
+		done
+		;;
+	esac
+	;;
+esac
+
+PACKAGESRC=$PACKAGEROOT/lib/package
+PACKAGEBIN=$INSTALLROOT/lib/package
+case $action:$run in
+use:-)	set '' $args
+	shift
+	case $# in
+	0)	;;
+	*)	shift ;;
+	esac
+	run="$@"
+	;;
+esac
+
+# HOSTTYPE specific package profile
+
+if	test -r $INSTALLROOT/lib/package/profile
+then	. $INSTALLROOT/lib/package/profile
+fi
+
+# more cygwin hassles
+
+case $HOSTTYPE in
+cygwin.*)
+	lose=
+	case $CYGWIN in
+	*nontsec*)
+		lose=ntsec
+		;;
+	*ntsec*);;
+	*)	exe=$TMPDIR/pkg$$.exe
+		rm -f "$exe"
+		: > "$exe"
+		if	test -x "$exe"
+		then	lose=ntsec
+		fi
+		;;
+	esac
+	case $CYGWIN in
+	*nobinmode*)
+		case $lose in
+		'')	lose=binmode ;;
+		*)	lose="$lose binmode" ;;
+		esac
+		;;
+	esac
+	case $lose in
+	?*)	echo "$command: $HOSTTYPE: export '$lose' in CYGWIN or languish in windows" >&2
+		exit 1
+		;;
+	esac
+	;;
+esac
+
+# set up the view state
+
+VIEW_bin=$INSTALLROOT VIEW_src=$PACKAGEROOT VIEW_all="$INSTALLROOT $PACKAGEROOT"
+VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
+$show VPATH=$VPATH
+$show export VPATH
+export VPATH
+IFS=':'
+set '' $VPATH
+shift
+IFS=$ifs
+for i
+do	case $i in
+	*/arch/*/*)
+		VIEW_src="$VIEW_src $i"
+		;;
+	*/arch/*)
+		VIEW_bin="$VIEW_bin $i"
+		;;
+	*)
+		VIEW_src="$VIEW_src $i"
+		;;
+	esac
+	VIEW_all="$VIEW_all $i"
+done
+
+# return 0 if arg in src|bin|all view
+
+view() # [test] [-|type] [src|bin|all] file
+{
+	case $1 in
+	-[dfsx])_view_T_=$1; shift ;;
+	*)	_view_T_=-f ;;
+	esac
+	case $1 in
+	-)	_view_t_= ;;
+	*)	_view_t_=$1 ;;
+	esac
+	shift
+	case $1 in
+	all)	shift; _view_v_=$VIEW_all ;;
+	bin)	shift; _view_v_=$VIEW_bin ;;
+	src)	shift; _view_v_=$VIEW_src ;;
+	*)	_view_v_=$VIEW_all ;;
+	esac
+	case $1 in
+	/*)	if	test $_view_T_ $1
+		then	_view_=$1
+			return 0
+		fi
+		;;
+	*)	for _view_d_ in $_view_v_
+		do	if	test $_view_T_ $_view_d_/$1
+			then	_view_=$_view_d_/$1
+				return 0
+			fi
+		done
+		;;
+	esac
+	_view_=
+	case $_view_t_ in
+	?*)	echo $command: $1: $_view_t_ not found >&2 ;;
+	esac
+	return 1
+}
+
+# determine the package and targets
+
+case $action in
+admin)	case $admin_action in
+	results)action=$admin_action
+		set '' $admin_args
+		shift;shift
+		admin_args="admin $*"
+		case $admin_on in
+		'')	target=$admin_args ;;
+		*)	target="on $admin_on $admin_args" ;;
+		esac
+		;;
+	esac
+	;;
+release)set '' $args
+	target=
+	while	:
+	do	shift
+		case $1 in
+		-|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+			target="$target $1"
+			;;
+		*)	break
+			;;
+		esac
+	done
+	package=$*
+	;;
+setup)	# { update read } with optional (bin|fun|include|lib) symlinks
+	# flat option sets up { bin fun include lib } symlinks from
+	# $INSTALLROOT to $PACKAGEROOT
+
+	# . is the package root
+
+	set '' $args
+	shift
+	types=
+	url=
+	while	:
+	do	case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		--)	shift
+			break
+			;;
+		flat)	flat=1 # backwards compatibility -- documentation dropped
+			;;
+		*://*|*.url)
+			url=$1
+			shift
+			break
+			;;
+		*)	types="$types $1"
+			;;
+		esac
+		shift
+	done
+	if	test ! -d $PACKAGEROOT/lib/package/tgz
+	then	$exec mkdir -p $PACKAGEROOT/lib/package/tgz || exit
+	fi
+	case " $types " in
+	*" source "*)
+		case " $* " in
+		'  ')	;;
+		*" INIT "*)
+			;;
+		*)	view - all src/cmd/INIT ||
+			set INIT "$@"
+			;;
+		esac
+		;;
+	esac
+	packages=`$0 $global authorize "$authorize" password "$password" update setup $types $url "$@" PACKAGEROOT=$PACKAGEROOT`
+	case $packages in
+	?*)	$0 $global read $packages PACKAGEROOT=$PACKAGEROOT
+	esac
+	exit
+	;;
+*)	package=
+	target=
+	set '' $args
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		''|-)	target="$target $package"
+			package=
+			;;
+		*)	if	view - src "lib/package/$1.pkg"
+			then	package="$package $1"
+			else	target="$target $package $1"
+				package=
+			fi
+			;;
+		esac
+	done
+	;;
+esac
+
+# flatten -- assumes symlink support
+
+case $flat in
+1)	case $action in
+	make|read|setup|update|use|view)
+		if	test ! -d $INSTALLROOT
+		then	$exec mkdir -p $INSTALLROOT || exit
+		fi
+		for i in bin include lib fun man share
+		do	if	test ! -d $INSTALLROOT/../../$i
+			then	$exec mkdir $INSTALLROOT/../../$i
+			fi
+			if	test ! -d $INSTALLROOT/$i
+			then	if	test ! -h $INSTALLROOT/$i
+				then	$exec ln -s ../../$i $INSTALLROOT/$i
+				fi
+			elif	test ! -h $INSTALLROOT/$i
+			then	for x in $INSTALLROOT/$i/.[a-z]* $INSTALLROOT/$i/*
+				do	if	test -f $x -o -d $x
+					then	if	test ! -d $INSTALLROOT/$i/$x || test ! -d $INSTALLROOT/../../$i/$x
+						then	$exec mv $x $INSTALLROOT/../../$i
+						fi
+					fi
+				done
+				$exec rm -rf $INSTALLROOT/$i
+				$exec ln -s ../../$i $INSTALLROOT/$i
+			fi
+		done
+		;;
+	esac
+	;;
+esac
+
+# check that cmd args are up to date a.out's
+
+checkaout()	# cmd ...
+{
+	case $PROTOROOT in
+	-)	PROTOROOT=
+		case $* in
+		ratz)	if	test -f $INITROOT/ratz.c -a -w $PACKAGEROOT
+			then	test -f $INITROOT/hello.c || {
+					cat > $INITROOT/hello.c <<'!'
+#ifndef printf
+#include <stdio.h>
+#endif
+int main() { int new = 0; printf("hello world\n"); return new;}
+!
+				}
+				test -f $INITROOT/p.c || {
+					cat > $INITROOT/p.c <<'!'
+/*
+ * small test for prototyping cc
+ */
+
+int main(int argc, char** argv) { return argc || argv; }
+!
+				}
+			fi
+			;;
+		esac
+		test -f $INITROOT/hello.c -a -f $INITROOT/p.c -a -w $PACKAGEROOT || {
+			for i
+			do	onpath $i || {
+					echo "$command: $i: command not found" >&2
+					return 1
+				}
+			done
+			return 0
+		}
+		case $cc in
+		'')	_PACKAGE_cc=0
+			;;
+		*)	_PACKAGE_cc=1
+			test -f $INITROOT/hello.c -a -f $INITROOT/p.c || {
+				echo "$command: $INITROOT: INIT package source not found" >&2
+				return 1
+			}
+			executable $INSTALLROOT/bin/nmake || {
+				# check for prototyping cc
+				# NOTE: proto.c must be K&R compatible
+
+				$CC -c $INITROOT/p.c >/dev/null 2>&1
+				c=$?
+				rm -f p.*
+				test 0 != "$c" && {
+					checkaout proto || return
+					PROTOROOT=$PACKAGEROOT/proto
+					$show PROTOROOT=$PACKAGEROOT/proto
+					export PROTOROOT
+					INITPROTO=$PROTOROOT/src/cmd/INIT
+					note proto convert $PACKAGEROOT/src into $PROTOROOT/src
+					if	test -d $PACKAGEROOT/src/cmd/nmake
+					then	dirs="src/cmd/INIT src/lib/libast src/lib/libardir  src/lib/libpp src/cmd/probe src/cmd/cpp src/cmd/nmake"
+					else	dirs="src"
+					fi
+					(
+						if	test -f $PROTOROOT/UPDATE
+						then	newer="-newer $PROTOROOT/UPDATE"
+						else	newer=""
+						fi
+						case $exec in
+						'')	cd $PACKAGEROOT
+							find $dirs -name '*.[CcHh]' $newer -print | proto -v -L - -C proto
+							;;
+						*)	$exec cd $PACKAGEROOT
+							$exec "find $dirs -name '*.[CcHh]' $newer -print | proto -L - -C proto"
+							;;
+						esac
+						$exec touch $PROTOROOT/UPDATE
+					)
+					VPATH=$INSTALLROOT:$PROTOROOT:$PACKAGEROOT$USER_VPATH
+					$show VPATH=$VPATH
+					export VPATH
+				}
+			}
+			for i in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
+			do	test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || return
+			done
+			;;
+		esac
+		;;
+	esac
+	case $_PACKAGE_cc in
+	'')	case $cc in
+		'')	_PACKAGE_cc=0 ;;
+		*)	_PACKAGE_cc=1 ;;
+		esac
+		;;
+	esac
+	for i
+	do	eval j=\$_PACKAGE_AOUT_$i
+		case $j in
+		'')	eval _PACKAGE_AOUT_$i=1 ;;
+		*)	continue ;;
+		esac
+		k=$_PACKAGE_cc
+		if	test -f $INITROOT/$i.c
+		then	k=${k}1
+		else	k=${k}0
+		fi
+		if	executable $EXECROOT/bin/$i
+		then	k=${k}1
+		else	k=${k}0
+		fi
+		: $k : compiler : source : binary :
+		case $k in
+		*00)	view - bin/$i && continue ;;
+		esac
+		case $k in
+		000)	echo "$command: $i: not found: download the INIT package $HOSTTYPE binary to continue" >&2
+			return 1
+			;;
+		010)	echo "$command: $i: not found: set CC=C-compiler or download the INIT package $HOSTTYPE binary to continue" >&2
+			return 1
+			;;
+		100)	echo "$command: $i: not found: download the INIT package source or $HOSTTYPE binary to continue" >&2
+			return 1
+			;;
+		110)	case $CROSS in
+			1)	echo "$command: $i: not found: make the local $EXECTYPE binary package before $HOSTTYPE" >&2
+				return 1
+				;;
+			esac
+			;;
+		?01)	: accept binary
+			continue
+			;;
+		011)	: accept binary
+			continue
+			;;
+		??1)	case $CROSS in
+			1)	continue ;;
+			esac
+			;;
+		esac
+		case `ls -t $INITROOT/$i.c $INSTALLROOT/bin/$i 2>/dev/null` in
+		"$INITROOT/$i.c"*)
+			note update $INSTALLROOT/bin/$i
+			if	test proto != "$i" && executable $INSTALLROOT/bin/proto
+			then	case $exec in
+				'')	$INSTALLROOT/bin/proto -p $INITROOT/$i.c > $i.c || return ;;
+				*)	$exec "$INSTALLROOT/bin/proto -p $INITROOT/$i.c > $i.c" ;;
+				esac
+				$exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $i.c || return
+				$exec rm -f $i.c
+			else	if	test ! -d $INSTALLROOT/bin
+				then	for j in arch arch/$HOSTTYPE arch/$HOSTTYPE/bin
+					do	test -d $PACKAGEROOT/$j || $exec mkdir $PACKAGEROOT/$j || return
+					done
+				fi
+				if	test '' != "$PROTOROOT" -a -f $INITPROTO/$i.c
+				then	$exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITPROTO/$i.c || return
+				else	$exec $CC $CCFLAGS -o $INSTALLROOT/bin/$i $INITROOT/$i.c || return
+				fi
+				case $i:$exec in
+				proto:)	test -d $INSTALLROOT/include || mkdir $INSTALLROOT/include
+					$INSTALLROOT/bin/proto -f /dev/null > $i.c
+					cmp -s $i.c $INSTALLROOT/include/prototyped.h 2>/dev/null || cp $i.c $INSTALLROOT/include/prototyped.h
+					rm $i.c
+					;;
+				esac
+			fi
+			test -f $i.o && $exec rm -f $i.o
+			i=$PATH
+			PATH=/bin
+			PATH=$i
+			;;
+		esac
+	done
+	return 0
+}
+
+# check package requirements against received packages
+
+requirements() # source|binary [ package ]
+{
+	case $1 in
+	binary)	r=$VIEW_BIN ;;
+	source)	r=$VIEW_SRC ;;
+	*)	r=$VIEW_ALL ;;
+	esac
+	shift
+	case $1 in
+	'')	x= ;;
+	*)	x=$* ;;
+	esac
+	set ''
+	for d in $r
+	do	set "$@" $d/gen/*.ver
+		case $x in
+		'')	set "$@" $d/gen/*.req
+			;;
+		*)	for p in $x
+			do	set "$@" $d/gen/$p.req
+			done
+			;;
+		esac
+	done
+	shift
+	e=0
+	x=$*
+	y=
+	n=
+	set ''
+	for i in $x
+	do	p=`echo $i | sed -e 's,.*/,,' -e 's,\....$,,'`
+		if	test -f $i
+		then	set "$@" $i
+			y="$y $p"
+		else	case $p in
+			'*')	;;
+			*)	n="$n $p" ;;
+			esac
+		fi
+	done
+	for i in $n
+	do	case " $y " in
+		*" $i "*)
+			;;
+		*)	echo "$command: $i: must read or write package" >&2
+			e=1
+			;;
+		esac
+	done
+	case $e in
+	1)	exit 1 ;;
+	esac
+	shift
+	test 0 != "$#" && release=`sort -r "$@" | {
+		q=
+		e=0
+		o=
+		while	read p v r s
+		do	q="$q
+$v $r"
+			case $p in
+			$o)	continue ;;
+			esac
+			case $s in
+			0)	e=1
+				case $r in
+				base)	echo "$command: base package $p.$v or newer required" >&2 ;;
+				*)	echo "$command: delta package $p.$v.$r or newer required" >&2 ;;
+				esac
+				;;
+			esac
+			o=$p
+		done
+		case $e in
+		0)	echo "$q" | sort | { read v r; read v r; echo $v; } ;;
+		1)	echo ERROR ;;
+		esac
+	}`
+	case $release in
+	ERROR)	case $force in
+		0)	exit 1 ;;
+		esac
+		;;
+	?*)	eval `echo $release | sed -e 's,\(.*\)-\(.*\)-\(.*\),yy=\1 mm=\2 dd=\3,'`
+		# slide back 4 months
+		case $mm in
+		01)	mm=09 dd=1 ;;
+		02)	mm=10 dd=1 ;;
+		03)	mm=11 dd=1 ;;
+		04)	mm=12 dd=1 ;;
+		05)	mm=01 dd=0 ;;
+		06)	mm=02 dd=0 ;;
+		07)	mm=03 dd=0 ;;
+		08)	mm=04 dd=0 ;;
+		09)	mm=05 dd=0 ;;
+		10)	mm=06 dd=0 ;;
+		11)	mm=07 dd=0 ;;
+		12)	mm=08 dd=0 ;;
+		esac
+		case $dd in
+		1)	yy=`expr $yy - 1` ;;
+		esac
+		release=$yy-$mm-01
+		count=1
+		lo=$release
+		release="-f $release -r $count"
+		;;
+	esac
+}
+
+# write ordered package prerequisite list to the standard output
+
+order() # [ package ]
+{
+	_order_t_=lib/package/tgz
+	case $action in
+	binary)	_order_a_=.$HOSTTYPE ;;
+	*)	_order_a_= ;;
+	esac
+	_order_n_=$#
+	case $_order_n_ in
+	0)	_order_p_=
+		for _order_v_ in $VIEW_all
+		do	for _order_f_ in $_order_v_/lib/package/*.pkg
+			do	if	test -f $_order_f_
+				then	_order_p_="$_order_p_ $_order_f_"
+				fi
+			done
+		done
+		set '' $_order_p_
+		shift
+	esac
+	{
+	if	test ratz != "$*"
+	then	for _order_f_ in ratz INIT
+		do	if	view -s - src $_order_t_/$_order_f_$_order_a_.tim
+			then	echo $_order_f_ $_order_f_
+			fi
+		done
+	fi
+	for _order_f_
+	do	while	:
+		do	view - src $_order_f_ && break
+			case $_order_f_ in
+			*.pkg)	;;
+			*)	_order_f_=$_order_f_.pkg; view - src $_order_f_ && break ;;
+			esac
+			case $_order_f_ in
+			*/*)	;;
+			*)	_order_f_=lib/package/$_order_f_; view - src $_order_f_ && break ;;
+			esac
+			echo "$command: $_order_f_: not a package" >&2
+			continue 2
+		done
+		_order_f_=$_view_
+		_order_p_=`echo $_order_f_ | sed -e 's,.*/,,' -e 's,\.pkg$,,'`
+		case $_order_n_ in
+		0)	view -s - src $_order_t_/$_order_p_$_order_a_.tim || continue ;;
+		esac
+		echo $_order_p_ $_order_p_
+		case $_order_p_ in
+		INIT|ratz)
+			;;
+		*)	echo INIT $_order_p_
+			;;
+		esac
+		{
+		req= req_sep=
+		op=::
+		while	read line
+		do	IFS=' 	\\'
+			set '' $line
+			IFS=$ifs
+			while	:
+			do	shift
+				case $# in
+				0)	break ;;
+				esac
+				case $1 in
+				:*:)	op=$1
+					;;
+				INIT|'$('*|*')')
+					;;
+				*)	case $op in
+					:REQUIRES:)
+						req="$req$req_sep$1"
+						req_sep=" "
+						;;
+					esac
+					;;
+				esac
+			done
+		done
+		for _order_i_ in $req
+		do	if	view - src lib/package/$_order_i_.pkg
+			then	case $_order_u_ in
+				0)	view -s - src $_order_t_/$_order_i_$_order_a_.tim || continue ;;
+				esac
+				echo $_order_i_ $_order_i_; echo INIT $_order_i_; echo $_order_i_ $_order_p_
+			fi
+		done
+		} < $_order_f_
+	done
+	} | tsort
+}
+
+# generate the package component list in _components_
+
+components() # [ package ]
+{
+	_components_=
+	for p
+	do	case $p in
+		'')	;;
+		INIT)	case " $_components_ " in
+			*" $p "*)	;;
+			*)		_components_="$_components_ $p" ;;
+			esac
+			;;
+		*)	if	view - src lib/package/$p.pkg
+			then	p=$_view_
+				op=::
+				exec < $p
+				while	read line
+				do	IFS=' 	\\'
+					set '' $line
+					IFS=$ifs
+					while	:
+					do	shift
+						case $# in
+						0)	break ;;
+						esac
+						case $1 in
+						:*:)	op=$1
+							;;
+						INIT|'$('*|*')')
+							;;
+						*)	case $op in
+							:PACKAGE:)
+								case " $_components_ " in
+								*" $1 "*)	;;
+								*)		_components_="$_components_ $1" ;;
+								esac
+								;;
+							esac
+							;;
+						esac
+					done
+				done
+				exec < /dev/null
+			elif	test -d $PACKAGEROOT/src/cmd/$p -o -d $PACKAGEROOT/src/lib/$p
+			then	_components_="$_components_ $p"
+			else	echo "$command: $p: package or component not found" >&2
+				exit 1
+			fi
+			;;
+		esac
+	done
+}
+
+# list main environment values
+
+showenv()
+{
+	case $1 in
+	''|make)for __i__ in CC SHELL $env
+		do	eval echo $__i__='$'$__i__
+		done
+		;;
+	esac
+}
+
+# capture command output
+
+capture() # file command ...
+{
+	case $make:$noexec in
+	:)	case $action in
+		install|make|view)
+			o=$action
+			;;
+		*)	case $package in
+			''|*' '*)
+				o=$action
+				;;
+			*)	o=$package
+				;;
+			esac
+			;;
+		esac
+		case $action in
+		write)	d=$PACKAGESRC/gen ;;
+		*)	d=$PACKAGEBIN/gen ;;
+		esac
+		test -d $d || $exec mkdir $d
+		o=$d/$o
+		case $o in
+		$output)o=$o.out
+			s=
+			;;
+		*)	output=$o
+			if	test -f $o.old
+			then	mv $o.old $o.out.1
+				if	test -f $o.out
+				then	mv $o.out $o.out.2
+				fi
+			elif	test -f $o.out
+			then	for i in `ls -t $o.out.? 2>/dev/null`
+				do	break
+				done
+				case $i in
+				*.1)	i=2 ;;
+				*.2)	i=3 ;;
+				*.3)	i=4 ;;
+				*.4)	i=5 ;;
+				*.5)	i=6 ;;
+				*.6)	i=7 ;;
+				*.7)	i=8 ;;
+				*.8)	i=9 ;;
+				*)	i=1 ;;
+				esac
+				mv $o.out $o.out.$i
+			fi
+			o=$o.out
+			: > $o
+			note $action output captured in $o
+			s="$command: $action start at `date` in $INSTALLROOT"
+			case $quiet in
+			0)	trap "echo \"$command: $action done  at \`date\`\" in $INSTALLROOT 2>&1 | \$TEE -a $o" 0 1 2 ;;
+			*)	trap "echo \"$command: $action done  at \`date\`\" in $INSTALLROOT >> $o" 0 1 2 ;;
+			esac
+			;;
+		esac
+		case $quiet in
+		0)	if	executable ! $TEE
+			then	TEE=tee
+			fi
+			# Connect 'tee' to a FIFO instead of a pipe, so that the build is invoked from
+			# the main shell environment and its exit status can be used for $error_status
+			rm -f $o.fifo
+			mkfifo -m 600 $o.fifo || exit
+			(
+				sleep 1
+				# unlink early
+				exec rm $o.fifo
+			) &
+			$TEE -a $o < $o.fifo &
+			{
+				case $s in
+				?*)	echo "$s"  ;;
+				esac
+				showenv $action
+				"$@"
+			} < /dev/null > $o.fifo 2>&1
+			;;
+		*)	{
+				case $s in
+				?*)	echo "$s"  ;;
+				esac
+				showenv $action
+				"$@"
+			} < /dev/null > $o 2>&1
+			;;
+		esac
+		;;
+	*)	$make "$@"
+		;;
+	esac
+	exit_status=$?
+	if	test "$exit_status" -gt "$error_status"
+	then	error_status=$exit_status
+	fi
+}
+
+package_install() # dest sum
+{
+	dest=$1 sum=$2
+	ot=
+	code=0
+	sed -e '/ /!d' -e 's,[^ ]* ,,' -e 's, \(arch/[^/]*\)/, \1 ,' -e '/ arch\//!s,^[^ ]* [^ ]* [^ ]*,& .,' -e 's,/\([^ /]*\)$, \1,' $sum |
+	while	read mode user group arch dir file
+	do	case $flat:$arch in
+		1:*|?:.)t=$dest/$dir ;;
+		*)	t=$dest/$arch/$dir ;;
+		esac
+		case $t in
+		$ot)	;;
+		*)	if	test ! -d "$t"
+			then	$exec mkdir -p "$t" || exit
+			fi
+			ot=$t
+			;;
+		esac
+		case $file in
+		?*)	case $arch in
+			.)	f=$dir/$file ;;
+			*)	f=$arch/$dir/$file ;;
+			esac
+			if	test -f "$f"
+			then	t=$t/$file
+				case $quiet in
+				0)	echo "$t" ;;
+				esac
+				$exec cp -f "$f" "$t" || code=1
+				$exec chmod $mode "$t" || code=1
+			fi
+			;;
+		esac
+	done
+	return $code
+}
+
+package_verify() # sum
+{
+	$exec $SUM -cp $1
+}
+
+make_recurse() # dir
+{
+	for _make_recurse_j in $makefiles
+	do	if	view - $1/$_make_recurse_j
+		then	return
+		fi
+	done
+}
+
+get() # host path [ file size ]
+{
+	case $HURL in
+	'')	HURL=.
+		for i in wget lynx curl
+		do	if	onpath $i
+			then	HURL=$i
+				break;
+			fi
+		done
+		AUTHORIZE="User-Agent: package AT&T Research\\r\\n"
+		case $HURL:$authorize in
+		.:?*)	AUTHORIZE="${AUTHORIZE}Authorization: Basic `print -n -r -- $authorize:$password | uuencode -h -x base64`\\r\\n" ;;
+		esac
+		;;
+	esac
+	getfd=8
+	case $3 in
+	'')	case $HURL in
+		.)	host=$1
+			path=$2
+			while	:
+			do	eval "exec $getfd<> /dev/tcp/$host/80" || exit
+				case $path in
+				/*)	;;
+				*)	path=/$path ;;
+				esac
+				print "GET $path HTTP/1.0\\r\\nHost: $host\\r\\n$AUTHORIZE\\r" >&$getfd
+				cat <&8 > get.tmp
+				got=`sed -e 1q get.tmp`
+				case $got in
+				*" "200" "*)
+					got=`sed -e '1,/^.$/d' -e '/^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]/!d' get.tmp`
+					: > get.err
+					code=0
+					break
+					;;
+				*" "30[123]" "*)
+					got=`sed -e '/^Location: /!d' -e 's,^Location: \(.*\)://\([^/]*\)\(/.*\),prot='\''\1'\'' host='\''\2'\'' path='\''\3'\'',' get.tmp`
+					case $got in
+					'')	rm get.tmp
+						echo "$command: $action: $url: redirect error" >&2
+						exit 1
+						;;
+					esac
+					eval $got
+					;;
+				*)	rm get.tmp
+					echo "$command: $action: $url: $got" >&2
+					echo '' "$got" > get.err
+					code=1
+					break
+					;;
+				esac
+			done
+			;;
+		curl)	case $authorize in
+			'')	curl -s -L -o get.tmp http://$1/$2 2> get.err; code=$? ;;
+			*)	curl -s -L -o get.tmp -u "$authorize":"$password" http://$1/$2 2> get.err; code=$? ;;
+			esac
+			got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp 2>/dev/null`
+			case $code in
+			0)	if	grep '^<H1>Authorization Required</H1>' get.tmp > get.err
+				then	code=1
+				fi
+				;;
+			esac
+			;;
+		hurl)	case $authorize in
+			'')	hurl http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+			*)	hurl -a "$authorize":"$password" http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+			esac
+			got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp`
+			;;
+		lynx)	case $authorize in
+			'')	lynx -source http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+			*)	lynx -source -auth "$authorize":"$password" http://$1/$2 > get.tmp 2> get.err; code=$? ;;
+			esac
+			got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp`
+			;;
+		wget)	wget -nv -O get.tmp ${authorize:+--http-user="$authorize"} ${password:+--http-passwd="$password"} http://$1/$2 2> get.err
+			code=$?
+			got=`grep '^[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWYZ]' get.tmp 2>/dev/null`
+			;;
+		*)	echo $command: $action: $HURL: url get command not found >&2
+			exit 1
+			;;
+		esac
+		if	test 0 != "$code"
+		then	case `cat get.err get.tmp 2>/dev/null` in
+			*[Aa][Uu][Tt][Hh][Oo][Rr][Ii][SsZz]*|*[Dd][Ee][Nn][Ii][Ee][Dd]*)
+				echo $command: $action: authorization required -- see $url for license acceptance authorization name and password >&2
+				;;
+			*)	cat get.err
+				;;
+			esac
+			rm -f get.tmp get.err
+			echo $command: $action: $2: download failed >&2
+			exit 1
+		fi
+		rm -f get.tmp get.err
+		;;
+	*)	case $exec in
+		'')	echo "$3 ($4 bytes):" >&2
+			case $HURL in
+			.)	eval "exec $getfd<> /dev/tcp/$1/80" || exit
+				path=$2/$3
+				case $path in
+				/*)	;;
+				*)	path=/$path ;;
+				esac
+				print "GET $path HTTP/1.0\\r\\nHost: $host\\r\\n$AUTHORIZE\\r" >&$getfd
+				read got <&$getfd
+				case $got in
+				*" 200 "*)
+					code=0
+					: > get.err
+					;;
+				*)	echo '' "$got" > get.err
+					code=1
+					;;
+				esac
+				while	read got <&$getfd
+				do	case $got in
+					''|?)	break ;;
+					esac
+				done
+				cat <&$getfd > get.tmp
+				;;
+			curl)	case $authorize in
+				'')	curl -s -L -o get.tmp http://$1/$2/$3 2> get.err; code=$? ;;
+				*)	curl -s -L -o get.tmp -u "$authorize":"$password" http://$1/$2/$3 2> get.err; code=$?
+				esac
+				case $code in
+				0)	if	grep '^<H1>Authorization Required</H1>' get.tmp > get.err
+					then	code=1
+					fi
+					;;
+				esac
+				;;
+			hurl)	case $authorize in
+				'')	ksh -x hurl http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+				*)	ksh -x hurl -a "$authorize":"$password" http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+				esac
+				;;
+			lynx)	case $authorize in
+				'')	lynx -source http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+				*)	lynx -source -auth "$authorize":"$password" http://$1/$2/$3 > get.tmp 2> get.err; code=$? ;;
+				esac
+				;;
+			wget)	wget -nv -O get.tmp ${authorize:+--http-user="$authorize"} ${password:+--http-passwd="$password"} http://$1/$2/$3 2> get.err
+				code=$?
+				;;
+			*)	echo $command: $action: $HURL: url get command not found >&2
+				exit 1
+				;;
+			esac
+			if	test 0 != "$code"
+			then	case `cat get.err get.tmp` in
+				*[Aa][Uu][Tt][Hh][Oo][Rr][Ii][SsZz]*|*[Dd][Ee][Nn][Ii][Ee][Dd]*)
+					echo $command: $action: authorization required -- see $url for license acceptance authorization name and password >&2
+					;;
+				*)	cat get.err
+					;;
+				esac
+				rm get.tmp get.err
+				echo $command: $action: $3: download failed >&2
+				exit 1
+			fi
+			rm get.err
+			case $checksum:$5 in
+			:*|*:-)	z=`wc -c < get.tmp`
+				case " $z " in
+				*" $4 "*)
+					;;
+				*)	rm -f get.tmp
+					echo $command: $3: download error: expected $4 bytes, got $z >&2
+					exit 1
+					;;
+				esac
+				;;
+			*)	z=`$checksum < get.tmp | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'`
+				case " $z " in
+				*" $5 "*)
+					;;
+				*)	rm -f get.tmp
+					echo $command: $3: download $checksum error: expected $5, got $z >&2
+					exit 1
+					;;
+				esac
+				;;
+			esac
+			mv get.tmp $3 || exit
+			;;
+		*)	echo "$3 ($4 bytes)" >&2
+			;;
+		esac
+	esac
+}
+
+# generate copyright notice
+
+copyright()
+{
+	if	test -f $1.lic
+	then	echo $1 package general copyright notice
+		echo
+		proto -c'#' -p -s -l $1.lic -o type=verbose,author='*' /dev/null
+		return 0
+	fi
+	case $1 in
+	*-*)	eval `echo '' $1 | sed 's/\([^-]*\)-\(.*\)/__j__="\1" __i__="\2"/'`
+		if	copyright $__i__ || copyright $__j__
+		then	return 0
+		fi
+		;;
+	esac
+	return 1
+}
+
+# run remote make on host
+
+remote() # host no-exec-background
+{
+	host=$1
+	background=$2
+	eval name=\$${host}_name user=\$${host}_user snarf=\$${host}_snarf type=\$${host}_type rsh=\$${host}_rsh root=\$${host}_root keep=\$${host}_keep log=\$${host}_log
+	case $keep in
+	1*)	;;
+	*)	return ;;
+	esac
+	case $host in
+	$main)	;;
+	*)	case $exec in
+		'')	exec > $admin_log/$log 2>&1 ;;
+		*)	echo "exec > $admin_log/$log 2>&1" ;;
+		esac
+		;;
+	esac
+	if	$admin_ping $name >/dev/null 2>&1 || $admin_ping $name >/dev/null 2>&1
+	then	cmd=". ./.profile"
+		case $root in
+		.)	root=
+			;;
+		*)	cmd="$cmd && cd $root"
+			root=$root/
+			;;
+		esac
+		cmd="$cmd && { test -f lib/package/admin/$admin_env && . ./lib/package/admin/$admin_env || true ;} && PATH=\${PWD:-\`pwd\`}/bin:\$PATH \${SHELL:-/bin/sh} -c 'package $admin_args PACKAGEROOT=\${PWD:-\`pwd\`} HOSTTYPE=$type VPATH='"
+		case $admin_binary in
+		'')	snarf= ;;
+		esac
+		case $snarf in
+		'')	$exec $rsh $user$name "$cmd" $background
+			;;
+		*?)	rcp=`echo $rsh | sed 's/\(.\).*/\1/'`cp
+			case $background in
+			?*)	$exec "{" ;;
+			esac
+			$exec $rsh $user$name "$cmd"
+			eval lst=$admin_list
+			case $admin_pkgs in
+			'')	filter=cat ;;
+			*)	filter="egrep lib/package/tgz/($admin_pkgs)\\." ;;
+			esac
+			if	$exec $rcp $user$name:${root}lib/package/tgz/$lst $PACKAGESRC/tgz
+			then	$exec $rcp `$filter $PACKAGESRC/tgz/$lst | sed "s,^,$user$name:,"` $PACKAGESRC/tgz
+			else	echo "$command: $user$name:${root}lib/package/tgz/$lst: not found" >&2
+			fi
+			case $background in
+			?*)	$exec "} $background" ;;
+			esac
+			;;
+		esac
+	else	echo "$command: $name: down" >&2
+	fi
+}
+
+# update package_src
+
+checksrc()
+{
+	case $package_src in
+	'')	package_src=$src
+		for _i_ in `cd $PACKAGESRC; ls *.def *.lic *.pkg 2>/dev/null | sed 's/[-.].*//'`
+		do	case " $package_src " in
+			*" $_i_ "*)
+				;;
+			*)	package_src="$package_src $_i_"
+				;;
+			esac
+		done
+		;;
+	esac
+}
+
+# check for native ascii 0:yes 1:no
+
+__isascii__=
+
+isascii()
+{
+	case $__isascii__ in
+	'')	case `echo A | od -o | sed -e 's/[ 	]*$//' -e '/[ 	]/!d' -e 's/.*[ 	]//'` in
+		005101|040412)	__isascii__=0 ;;
+		*)		__isascii__=1 ;;
+		esac
+	esac
+	return $__isascii__
+}
+
+error_status=0
+
+case $action in
+
+admin)	while	test ! -f $admin_db
+	do	case $admin_db in
+		/*)	echo $command: $action: $admin_db: data file not found >&2
+			exit 1
+			;;
+		esac
+		view file src lib/package/admin/$admin_db || exit 1
+		admin_db=$_view_
+	done
+	admin_components=
+	case $admin_action in
+	list)	cat $admin_db
+		exit
+		;;
+	test)	set $admin_args
+		while	:
+		do	case $# in
+			1)	break ;;
+			esac
+			shift
+			case $1 in
+			*=*)	;;
+			*)	admin_components=-$1
+				break
+				;;
+			esac
+		done
+		;;
+	esac
+	: all work done in $PACKAGESRC/admin
+	cd $PACKAGESRC/admin || exit
+	checksrc
+	packages=
+	admin_log=${admin_action}${admin_components}.log
+	exec < $admin_db || exit
+	test -d $admin_log || $exec mkdir $admin_log || exit
+	case $admin_on in
+	'')	admin_on="*" ;;
+	esac
+	hostname=
+	hosts=
+	logs=
+	local_hosts=
+	local_types=
+	pids=
+	remote_hosts=
+	sync_hosts=
+	admin_host=_admin_host_
+	admin_out=
+	case " $admin_args " in
+	*" write binary "*|*" write "*" binary "*)
+		admin_binary=1
+		;;
+	*)	admin_binary=
+		;;
+	esac
+	case $only in
+	1)	admin_args="only $admin_args" ;;
+	esac
+	trap 'kill $pids >/dev/null 2>&1' 1 2 3 15
+	index=0
+	while	read type host root date time make test write owner attributes
+	do	case $type in
+		''|'#'*);;
+		*=*)	eval "$type $host $root $date $time $make $test $write $owner $attributes"
+			;;
+		*)	case $admin_action in
+			make|test|write)
+				eval f='$'$admin_action
+				case $f in
+				*[!0123456789]*)	continue ;;
+				esac
+				;;
+			esac
+			rsh=rsh
+			case $host in
+			*@*)	IFS=@
+				set '' $host
+				IFS=$ifs
+				user=${2}@
+				host=$3
+				;;
+			*)	user=
+				;;
+			esac
+			: type=$type host=$host root=$root date=$date time=$time make=$make test=$test write=$write :
+			name=$host
+			host=`echo $name | sed 's,[^abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789],__,g'`
+			eval x='$'${host}_index
+			eval ${host}_index=1
+			case $x in
+			1)	i=0
+				while	:
+				do	case $i in
+					$index)	h=''
+						break
+						;;
+					esac
+					i=`expr $i + 1`
+					eval h='$'${admin_host}${i}_name
+					case $h in
+					$host)	host=${admin_host}${i}
+						eval user='$'${host}_user root='$'${host}_rsh:$host:'$'${host}_root
+						break
+						;;
+					esac
+				done
+				;;
+			esac
+			case $root in
+			*:$name:*)root=`echo '' $root | sed 's,:.*,:,'` ;;
+			esac
+			case $root in
+			*:*:*)	index=`expr $index + 1`
+				host=${admin_host}$index
+				;;
+			*:*)	case " $sync_hosts " in
+				*" $name ${admin_host}"*)
+					set '' '' $sync_hosts
+					while	:
+					do	shift
+						shift
+						case $1 in
+						$name)	host=$2
+							break
+							;;
+						esac
+					done
+					;;
+				*)	index=`expr $index + 1`
+					host=${admin_host}$index
+					sync_hosts="$sync_hosts $name $host"
+					;;
+				esac
+				;;
+			*)	index=`expr $index + 1`
+				host=${admin_host}$index
+				;;
+			esac
+			case $root in
+			-*)	continue
+				;;
+			*:*)	case $admin_all in
+				0)	continue ;;
+				esac
+				case $root in
+				*:)	root=${root}. ;;
+				esac
+				IFS=:
+				set '' $root
+				IFS=$ifs
+				sync=$host
+				case $hostname in
+				'')	hostinfo name
+					hostname=$_hostinfo_
+					;;
+				esac
+				shift
+				case $# in
+				0)	;;
+				1)	root=$1
+					;;
+				2)	rsh=$1 root=$2
+					;;
+				*)	rsh=$1 sync=$2 root=$3
+					case $sync in
+					${admin_host}*)
+						;;
+					?*)	case " $sync_hosts " in
+						*" $sync ${admin_host}"*)
+							set '' '' $sync_hosts
+							while	:
+							do	shift
+								shift
+								case $1 in
+								$sync)	sync=$2
+									break
+									;;
+								esac
+							done
+							;;
+						*)	index=`expr $index + 1`
+							x=${admin_host}$index
+							sync_hosts="$sync_hosts $sync $x"
+							sync=$x
+							;;
+						esac
+						;;
+					esac
+					;;
+				esac
+				;;
+			*)	sync=
+				;;
+			esac
+			case $name in
+			$admin_on)
+				keep=1
+				;;
+			*)	case " $admin_on " in
+				*" $name "*)	keep=1 ;;
+				*)		keep=0 ;;
+				esac
+				;;
+			esac
+			case " $admin_out " in
+			*" $name "*)
+				log=$name.$type
+				;;
+			*)	admin_out="$admin_out $name"
+				log=$name
+				;;
+			esac
+			case $sync in
+			'')	local_types="$local_types $type" ;;
+			esac
+			case $sync in
+			$host)	remote_hosts="$remote_hosts $host"
+				;;
+			?*)	eval ${sync}_share=\"\$${sync}_share $host\"
+				;;
+			'')	local_hosts="$local_hosts $host"
+				;;
+			esac
+			eval ${host}_name='$'name ${host}_type='$'type ${host}_user='$'user ${host}_sync='$'sync ${host}_snarf='$'sync ${host}_rsh='$'rsh ${host}_root='$'root ${host}_keep='$'keep ${host}_log='$'log
+			;;
+		esac
+	done
+	p=
+	for i in $admin_args
+	do	p="$i $p"
+	done
+	admin_pkgs=
+	for i in $p
+	do	if	view - src "lib/package/$i.pkg"
+		then	case $admin_pkgs in
+			'')	admin_pkgs="$i" ;;
+			*)	admin_pkgs="$admin_pkgs|$i" ;;
+			esac
+		fi
+	done
+	: "admin_binary :" $admin_binary
+	: "admin_args   :" $admin_args
+	: "admin_pkgs   :" $admin_pkgs
+	: "admin_on     :" "$admin_on"
+	: "local_hosts  :" $local_hosts
+	: "local_types  :" $local_types
+	: "remote_hosts :" $remote_hosts
+	: "sync_hosts   :" $sync_hosts
+	: "sync_share   :" $sync_share
+	case $admin_binary in
+	1)	admin_bin_types=
+		admin_bin_main=
+		for main in $local_hosts $remote_hosts
+		do	eval share=\$${main}_share keep=\$${main}_keep
+			case $keep in
+			0*)	continue ;;
+			esac
+			for host in $main $share
+			do	case " $admin_bin_hosts " in
+				*" $host "*)
+					continue
+					;;
+				esac
+				eval type=\$${host}_type
+				case " $admin_bin_types " in
+				*" $type "*)
+					continue
+					;;
+				esac
+				case " $types " in
+				"  ")	;;
+				*" $type "*)
+					;;
+				*)	continue
+					;;
+				esac
+				admin_bin_hosts="$admin_bin_hosts $host"
+				admin_bin_types="$admin_bin_types $type"
+				case " $admin_bin_hosts " in
+				*" $main "*)
+					;;
+				*)	case " $admin_bin_main " in
+					*" $main "*)
+						;;
+					*)	admin_bin_main="$admin_bin_main $main"
+						;;
+					esac
+					;;
+				esac
+			done
+		done
+		local=
+		remote=
+		for host in $admin_bin_main $admin_bin_hosts
+		do	case " $local_hosts " in
+			*" $host "*)
+				local="$local $host"
+				;;
+			*)	case " $remote_hosts " in
+				*" $host "*)
+					remote="$remote $host"
+					;;
+				esac
+				;;
+			esac
+		done
+		local_hosts=$local
+		remote_hosts=$remote
+		;;
+	esac
+	for host in $remote_hosts $local_hosts
+	do	eval share=\$${host}_share
+		case $share in
+		?*)	while	:
+			do	oshare=$share
+				for s in $share
+				do	eval r='$'${s}_share
+					case $r in
+					?*)	case " $share " in
+						*" $r "*)	;;
+						*)		share="$share $r" ;;
+						esac
+						;;
+					esac
+				done
+				case $share in
+				$oshare)	eval ${host}_share="'$share'"
+						break
+						;;
+				esac
+			done
+			;;
+		esac
+	done
+	for host in $remote_hosts
+	do	eval type=\$${host}_type
+		case " $local_types " in
+		*" $type "*)
+			eval ${host}_snarf=
+			;;
+		esac
+		eval name=\$${host}_name keep=\$${host}_keep share=\$${host}_share
+		for share in $share
+		do	eval type=\$${share}_type keep=\$keep\$${share}_keep
+			case " $local_types " in
+			*" $type "*)
+				eval ${share}_snarf=
+				;;
+			esac
+		done
+		case $keep in
+		0*1*)	keep=2$keep ;;
+		*1*)	;;
+		*)	keep=0 ;;
+		esac
+		eval ${host}_keep=$keep
+	done
+	for host in $remote_hosts $local_hosts
+	do	eval name=\$${host}_name user=\$${host}_user type=\$${host}_type sync=\$${host}_sync snarf=\$${host}_snarf share=\$${host}_share rsh=\$${host}_rsh root=\$${host}_root keep=\$${host}_keep
+		case $keep in
+		0*)	continue ;;
+		esac
+		case $sync in
+		'')	case $admin_action in
+			ditto)	continue ;;
+			esac
+			case $admin_binary in
+			1)	case $keep in
+				1*|?*1*);;
+				*)	continue ;;
+				esac
+				;;
+			esac
+			;;
+		esac
+		eval main_log='$'${host}_log
+		main=
+		share_keep=
+		for i in $host $share
+		do	eval n='$'${i}_name t='$'${i}_type q='$'${i}_sync s='$'${i}_snarf l='$'${i}_log k='$'${i}_keep
+			case $main:$k in
+			:*)	;;
+			*:0)	continue ;;
+			esac
+			case $admin_binary in
+			1)	case $s:$q in
+				:?*)	continue ;;
+				esac
+				case " $admin_bin_hosts " in
+				*" $i "*)
+					;;
+				*)	continue
+					;;
+				esac
+				;;
+			esac
+			case $main in
+			'')	main=$i ;;
+			*)	share_keep="$share_keep $i" ;;
+			esac
+			echo package "$admin_args" "[ $n $t ]"
+			case $exec in
+			'')	: > $admin_log/$l ;;
+			*)	$exec ": > $admin_log/$l" ;;
+			esac
+		done
+		host=$main
+		share=$share_keep
+		case $force in
+		0)	admin_ditto_update=--update ;;
+		*)	admin_ditto_update= ;;
+		esac
+		case $exec in
+		'')	{
+			case $admin_binary:$sync in
+			:?*)	eval syncname='$'${sync}_name
+				test -x $PACKAGEROOT/bin/package && $admin_ditto $admin_ditto_update --remote=$rsh --expr="name=='package'" $PACKAGEROOT/bin $user$syncname:$root/bin
+				test -d $PACKAGESRC && $admin_ditto $admin_ditto_update --remote=$rsh --expr="if(level>1&&path!='LICENSES/*')status=SKIP;path=='LICENSES*|*.(pkg|lic|def)'" $PACKAGESRC $user$syncname:$root/lib/package
+				for dir in $package_src
+				do	case $MAKESKIP in
+					'')	expr="--expr=if(name=='$admin_ditto_skip')status=SKIP" ;;
+					*)	expr="--expr=if(name=='$admin_ditto_skip'||level==1&&name=='$MAKESKIP')status=SKIP" ;;
+					esac
+					test -d $PACKAGEROOT/src/$dir && $admin_ditto $admin_ditto_update --remote=$rsh "$expr" $PACKAGEROOT/src/$dir $user$syncname:$root/src/$dir
+				done
+				;;
+			esac
+			case $admin_action in
+			ditto)	;;
+			?*)	pids=
+				set '' $host $share
+				while	:
+				do	shift
+					case $# in
+					0)	break
+						;;
+					1)	remote $1
+						;;
+					*)	remote $1 &
+						pids="$pids $!"
+						;;
+					esac
+				done
+				case $pids in
+				?*)	wait $pids ;;
+				esac
+				;;
+			esac
+			} < /dev/null > $admin_log/$main_log 2>&1 &
+			pids="$pids $!"
+			;;
+		*)	echo "{"
+			case $admin_binary:$sync in
+			:?*)	eval syncname='$'${sync}_name
+				test -d $PACKAGESRC && echo $admin_ditto $admin_ditto_update --remote=$rsh --expr="if(level>1)status=SKIP;name=='*.(pkg|lic|def)'" $PACKAGESRC $user$syncname:$root/lib/package
+				for dir in $package_src
+				do	case $MAKESKIP in
+					'')	expr="--expr=if(name=='$admin_ditto_skip')status=SKIP" ;;
+					*)	expr="--expr=if(name=='$admin_ditto_skip'||level==1&&name=='$MAKESKIP')status=SKIP" ;;
+					esac
+					test -d $PACKAGEROOT/src/$dir && echo $admin_ditto $admin_ditto_update --remote=$rsh "$expr" $PACKAGEROOT/src/$dir $user$syncname:$root/src/$dir
+				done
+				;;
+			esac
+			case $admin_action in
+			ditto)	;;
+			?*)	pids=
+				set '' $host $share
+				while	:
+				do	shift
+					case $# in
+					0)	break
+						;;
+					1)	remote $1
+						;;
+					*)	remote $1 "&"
+						pids=1
+						;;
+					esac
+				done
+				case $pids in
+				1)	echo wait ;;
+				esac
+				;;
+			esac
+			echo "} < /dev/null > $admin_log/$main_log 2>&1 &"
+			;;
+		esac
+		eval name='$'${main}_name
+		hosts="$hosts $name"
+		logs="$logs $main_log"
+		for share in $share
+		do	eval keep=\$${share}_keep
+			case $keep in
+			1)	eval name='$'${share}_name log='$'${share}_log
+				hosts="$hosts $name"
+				logs="$logs $log"
+				;;
+			esac
+		done
+	done
+	case $exec in
+	'')	# track the progress
+		case $quiet in
+		0)	cd $admin_log
+			tail -t $PACKAGE_admin_tail_timeout -f $logs
+			cd ..
+			;;
+		esac
+		# wait for the remote actions to complete
+		wait
+		trap - 1 2 3 15
+		# update the db
+		exec < $admin_db || exit
+		exec 9>&1
+		D=`date +%y%m%d`
+		while	read line
+		do	set -- $line
+			case $1 in
+			''|'#'*|*=*)
+				;;
+			*)	case " $hosts " in
+				*" $2 "*)
+					: ast date command assumed :
+					E=`eval date -E \`egrep '[ 	](start|done)[ 	][ 	]*at[ 	]' $admin_log/$2 | sed -e 's/.*[ 	][ 	]*at[ 	][ 	]*//' -e 's/[ 	][ 	]*in[ 	].*$//' -e 's/.*/"&"/'\``
+					M=$6 T=$7 W=$8
+					case $admin_action in
+					make|view)
+						M=`egrep -c ']:.* (\*\*\*.* code|don'\''t know) | \*\*\* termination code ' $admin_log/$2` ;;
+					test)	T=`grep -ci 'fail[es]' $admin_log/$2` ;;
+					*)	W=`grep '^[abcdefghijklmnopqrstuvwxyz][abcdefghijklmnopqrstuvwxyz]*:.' $admin_log/$2 | egrep -cv 'start at|done  at|output captured|warning:|: package not found|whence: command not found'` ;;
+					esac
+					case $1 in
+					?|??|???|????|?????|??????|???????)
+						t1='		'
+						;;
+					????????|?????????|??????????|???????????|????????????|?????????????|??????????????|???????????????)
+						t1='	'
+						;;
+					*)	t1=''
+						;;
+					esac
+					case $2 in
+					?|??|???|????|?????|??????|???????)
+						t2='	'
+						;;
+					*)	t2=''
+						;;
+					esac
+					case $3 in
+					?|??|???|????|?????|??????|???????)
+						t3='	'
+						;;
+					*)	t3=''
+						;;
+					esac
+					case $E in
+					?????)	E=" $E" ;;
+					????)	E="  $E" ;;
+					???)	E="   $E" ;;
+					??)	E="    $E" ;;
+					?)	E="     $E" ;;
+					esac
+					case $M in
+					???)	M="$M" ;;
+					??)	M=" $M" ;;
+					?)	M="  $M" ;;
+					'')	M="  0" ;;
+					esac
+					case $T in
+					???)	T="$T" ;;
+					??)	T=" $T" ;;
+					?)	T="  $T" ;;
+					'')	T="  0" ;;
+					esac
+					case $W in
+					???)	W="$W" ;;
+					??)	W=" $W" ;;
+					?)	W="  $W" ;;
+					'')	W="  0" ;;
+					esac
+					A=$1$t1
+					H=$2$t2
+					R=$3$t3
+					case $# in
+					[0-8])	O=
+						K=
+						;;
+					*)	shift 8
+						O=$1
+						K=$2
+						case $O in
+						''|?|??|???)	K="	$K" ;;
+						esac
+						case $# in
+						[0-2])	;;
+						*)	K="$K $*" ;;
+						esac
+						;;
+					esac
+					echo "$A	$H	$R	$D	$E	$M $T $W $O	$K"
+					echo "$A	$H	$R	$D	$E	$M $T $W $O	$K" >&9
+					continue
+					;;
+				esac
+				;;
+			esac
+			echo "$line"
+		done > $admin_db.new
+		mv $admin_db $admin_db.old
+		mv $admin_db.new $admin_db
+		;;
+	esac
+	;;
+
+clean|clobber)
+	cd $PACKAGEROOT
+	$exec rm -rf arch/$HOSTTYPE
+	if	test "$flat" = 1
+	then	$exec rm -rf \
+			bin/.paths \
+			bin/ar \
+			bin/cc \
+			bin/crossexec \
+			bin/ditto \
+			bin/filter \
+			bin/hurl \
+			bin/iffe \
+			bin/ksh \
+			bin/mamake \
+			bin/mktest \
+			bin/ok/ \
+			bin/proto \
+			bin/pty \
+			bin/ratz \
+			bin/regress \
+			bin/release \
+			bin/rt \
+			bin/shcomp \
+			bin/suid_exec \
+			bin/*.old \
+			fun/ \
+			include/ \
+			lib/file/ \
+			lib/lib/ \
+			lib/libast.a \
+			lib/libcmd.a \
+			lib/libdll.a \
+			lib/libshell.a \
+			lib/libsum.a \
+			lib/*.old \
+			lib/make/ \
+			lib/package/gen/ \
+			lib/probe/ \
+			man/
+	fi
+	exit
+	;;
+
+contents|list)
+	# all work in $PACKAGESRC
+
+	cd $PACKAGESRC
+
+	# generate the package list
+
+	set '' $target $package
+	shift
+	argc=$#
+	case $# in
+	0)	set '' *.pkg
+		case $2 in
+		'*.pkg')
+			echo $command: $action: no packages >&2
+			exit 1
+			;;
+		esac
+		set '' `echo $* | sed 's,\.pkg,,g'`
+		shift
+		;;
+	esac
+	sep="$nl    "
+	echo packages in $PACKAGEROOT
+	case $action in
+	list)	echo
+		echo "NAME${nl}VERSION${nl}RELEASE${nl}TYPE${nl}STATUS${nl}REQUIRES${nl}----${nl}-------${nl}-------${nl}----${nl}------${nl}--------" | pr -6 -a -o4 -t
+		;;
+	esac
+	{
+	omit=:
+	for pkg
+	do	if	test ! -f $pkg.pkg
+		then	echo $command: $action: $pkg: not a package >&2
+		else	if	test -f gen/$pkg.ver
+			then	set '' `cat gen/$pkg.ver`
+				case $3 in
+				$2)	ver=base ;;
+				*)	ver=$3 ;;
+				esac
+				if	test -s tgz/$pkg.tim
+				then	sts=local
+				else	sts=
+				fi
+			else	ver=
+				sts=unwritten
+			fi
+			typ=
+			txt=
+			cmp= cmp_sep=
+			req= req_sep=
+			op=::
+			exec < $pkg.pkg
+			while	read line
+			do	IFS=' 	\\'
+				set '' $line
+				IFS=$ifs
+				while	:
+				do	shift
+					case $# in
+					0)	break ;;
+					esac
+					case $1 in
+					:*:)	op=$1
+						;;
+					INIT|'$('*|*')')
+						;;
+					*)	case $op in
+						:DESCRIPTION:)
+							txt="$txt$sep$line"
+							break
+							;;
+						:PACKAGE:)
+							cmp="$cmp$cmp_sep$1"
+							cmp_sep=$nl
+							;;
+						:REQUIRES:)
+							req="$req$req_sep$1"
+							req_sep=" "
+							;;
+						esac
+						;;
+					esac
+				done
+			done
+			exec < /dev/null
+			case $txt in
+			?*)	txt="$nl$txt" ;;
+			esac
+			case :$ver: in
+			*::*)	;;
+			*)	case $action in
+				list)	case $sts in
+					'')	case `ls -t "tgz/$pkg.$ver.base" "tgz/$pkg.tim" 2>/dev/null` in
+						"tgz/$pkg.tim"*)
+							sts=read
+							;;
+						*)	sts=unread
+							;;
+						esac
+						;;
+					esac
+					echo "$pkg${nl}$ver${nl}base${nl}$typ${nl}$sts${nl}$req"
+					case $typ in
+					'')	omit=$omit$pkg.$ver.base: ;;
+					esac
+					;;
+				*)	case $req in
+					?*)	req=": $req" ;;
+					esac
+					echo
+					echo $pkg $ver $req "$txt"
+					case $cmp in
+					?*)	echo "${sep}Components in this package:$nl"
+						echo "$cmp" | pr -4 -o4 -t ;;
+					esac
+					;;
+				esac
+				;;
+			esac
+		fi
+	done
+	case $argc:$action in
+	0:list)	if	test -d tgz
+		then	cd tgz
+			# f:file p:package v:version r:release t:type u:update
+			for f in `find . -name '*?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]*' -print | sed 's,^\./,,' | sort -r`
+			do	eval `echo "$f" | sed -e 's,\.c$,,' -e 's,\.gz$,,' -e 's,\.exe$,,' -e 's,\.tgz$,,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]\([0123456789][0123456789][0123456789][0123456789][^_.]*\)[_.]*\(.*\),p=\1 v=\2 r=\3 t=\4,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]*\(.*\),p=\1 v=\2 r=base t=\3,'`
+				case $t in
+				'')	case $omit in
+					*:$p.$v.$r:*)	continue ;;
+					esac
+					u=$p.tim
+					;;
+				*)	u=$p.$t.tim
+					;;
+				esac
+				if	test -s "$u"
+				then	s=local
+				elif	test -f "$u"
+				then	case `ls -t "$f" "$u" 2>/dev/null` in
+					"$u"*)	s=read ;;
+					*)	s=unread ;;
+					esac
+				else	s=unread
+				fi
+				echo "$p$nl$v$nl$r$nl$t$nl$s$nl"
+			done
+		fi
+		;;
+	esac
+	} |
+	case $action in
+	list)	pr -6 -a -o4 -t | sort -u ;;
+	*)	cat ;;
+	esac
+	case $argc in
+	0)	if	test -d $PACKAGEROOT/arch
+		then	echo
+			echo architectures in $PACKAGEROOT
+			echo
+			for i in `ls $PACKAGEROOT/arch`
+			do	if	test -f $PACKAGEROOT/arch/$i/lib/package/gen/host
+				then	h=`cat $PACKAGEROOT/arch/$i/lib/package/gen/host`
+				else	h=
+				fi
+				echo $i
+				echo $h
+				echo
+				echo
+			done | pr -4 -a -o4 -t
+		fi
+		;;
+	esac
+	;;
+
+copyright)
+	# all work in $PACKAGESRC
+
+	cd $PACKAGESRC
+
+	# generate the package list
+
+	set '' $target $package
+	shift
+	argc=$#
+	case $# in
+	0)	set '' `echo *.lic | sed 's,\.lic,,g'`
+		shift
+		case $1 in
+		'*')	echo $command: $action: no packages >&2
+			exit 1
+			;;
+		esac
+		;;
+	esac
+	checkaout proto || exit
+	for i
+	do	copyright $i
+	done
+	;;
+
+export)	case $INSTALLROOT in
+	$PACKAGEROOT)
+		INSTALLROOT=$INSTALLROOT/arch/$HOSTTYPE
+		;;
+	esac
+	case $only in
+	0)	v='$i=' ;;
+	*)	v= ;;
+	esac
+	set '' $target $package
+	case $# in
+	1)	set '' $env ;;
+	esac
+	while	:
+	do	case $# in
+		1)	break ;;
+		esac
+		shift
+		i=$1
+		eval echo ${v}'$'${i}
+	done
+	;;
+
+install)cd $PACKAGEROOT
+	set '' $package
+	shift
+	case $only in
+	0)	set '' `order "$@"`
+		shift
+		;;
+	esac
+	case $# in
+	0)	echo "$command: at least one package name expected" >&2
+		exit 1
+		;;
+	esac
+	package=$*
+	requirements - $package
+	set '' $target
+	shift
+	case $1 in
+	flat)	flat=1 # backwards compatibility -- documentation dropped
+		shift
+		;;
+	esac
+	case $# in
+	0)	echo "$command: $action: target directory argument expected" >&2
+		exit 1
+		;;
+	esac
+	target=
+	while	:
+	do	case $# in
+		1)	directory=$1
+			break
+			;;
+		esac
+		target="$target $1"
+		shift
+	done
+	if	test ! -d $directory
+	then	echo "$command: $action: $directory: target directory not found" >&2
+		exit 1
+	fi
+	case $target in
+	'')	cd arch
+		set '' *
+		shift
+		target=$*
+		cd ..
+		;;
+	esac
+	code=0
+	makecheck=1
+	for a in $target
+	do	case $a in
+		-)	a=$HOSTTYPE ;;
+		esac
+		case $flat:$a in
+		1:*|?:.)dest=$directory
+			;;
+		*)	dest=$directory/arch/$a
+			if	test "" = "$exec" -a ! -d $dest
+			then	mkdir -p $dest || {
+					echo "$command: $dest: destination directory must exist" >&2
+					exit 1
+				}
+			fi
+			;;
+		esac
+		for i in $package
+		do	if	test "ratz" = "$i"
+			then	: skip
+			elif	test -f arch/$a/lib/package/gen/$i.sum
+			then	package_install $directory arch/$a/lib/package/gen/$i.sum || code=1
+			elif	test ! -d arch/$a/bin
+			then	echo "$command: $a: invalid architecture" >&2
+			elif	test ! -d $dest
+			then	echo "$command: $dest: destination directory must exist" >&2
+			else	if	test "" != "$makecheck"
+				then	if	onpath $MAKE
+					then	MAKE=$_onpath_
+					else	echo "$command: $MAKE: not found" >&2
+						exit 1
+					fi
+					makecheck=
+				fi
+				if	test "" != "$exec"
+				then	(
+						trap - 0 1 2 15
+						echo "=== $i installation manifest ==="
+						cd arch/$a
+						(
+						cd lib/package
+						INSTALLROOT=$PACKAGEROOT/arch/$a
+						VPATH=$INSTALLROOT:$PACKAGEROOT:$VPATH
+						export INSTALLROOT VPATH
+						$MAKE -s $makeflags -f $i.pkg $qualifier list.installed $assign
+						) | sort -u
+					)
+				else	(
+						set -
+						cd arch/$a
+						(
+						cd lib/package
+						INSTALLROOT=$PACKAGEROOT/arch/$a
+						VPATH=$INSTALLROOT:$PACKAGEROOT:$VPATH
+						export INSTALLROOT VPATH
+						echo lib/$command
+						$MAKE -s $makeflags -f $i.pkg $qualifier list.installed $assign
+						) | sort -u | pax -drw -ps $dest
+					)
+				fi
+			fi
+		done
+	done
+	exit $code
+	;;
+
+license)# all work in $PACKAGESRC/LICENSES
+
+	cd $PACKAGESRC/LICENSES || exit
+
+	# generate the package list
+
+	set '' $target $package
+	shift
+	argc=$#
+	case $# in
+	0)	set '' *
+		shift
+		case $1 in
+		'*')	echo $command: $action: no licenses >&2
+			exit 1
+			;;
+		esac
+		;;
+	*)	checkaout proto || exit
+		a=
+		for i
+		do	while	:
+			do	if	test -f ../$i.lic
+				then	j=`proto -df -l ../$i.lic -o query=type /dev/null 2>/dev/null`
+					case $j in
+					?*)	if	test -f $j
+						then	case " $a " in
+							*" $j "*)	;;
+							*)		a="$a $j" ;;
+							esac
+						fi
+						break
+						;;
+					esac
+				fi
+				case $i in
+				*-*)	i=`echo $i | sed 's/-[^-]*$//'`
+					;;
+				*)	echo "$command: $i: package license not found" >&2
+					break
+					;;
+				esac
+			done
+		done
+		set '' $a
+		shift
+		;;
+	esac
+	for i
+	do	case $exec in
+		'')	echo
+			echo "		--- $i source license ---"
+			echo
+			cat $i
+			;;
+		*)	echo $PACKAGESRC/LICENSES/$i
+			;;
+		esac
+	done
+	;;
+
+make|view)
+	cd $PACKAGEROOT
+	case $package in
+	'')	lic="lib/package/*.lic"
+		;;
+	*) 	for i in $package
+		do	lic="$lic lib/package/$i.lic"
+			case $i in
+			*-*)	lic="$lic lib/package/"`echo $i | sed 's,-.*,,'`".lic" ;;
+			esac
+		done
+		;;
+	esac
+	checksrc
+	requirements source $package
+	components $package
+	package=$_components_
+
+	# check for some required commands
+
+	must="$AR"
+	warn="$NM yacc bison"
+	test="$must $warn"
+	have=
+	IFS=:
+	set /$IFS$PATH
+	IFS=$ifs
+	shift
+	for t in $test
+	do	if	executable $t
+		then	have="$have $t"
+		fi
+	done
+	for d
+	do	for t in $test
+		do	case " $have " in
+			*" $t "*)
+				;;
+			*)	if	executable $d/$t
+				then	have="$have $t"
+				fi
+				;;
+			esac
+		done
+	done
+	case " $have " in
+	*" bison "*)	;;
+	*" yacc "*)	have="$have bison" ;;
+	esac
+	case " $have " in
+	*" yacc "*)	;;
+	*" bison "*)	have="$have yacc" ;;
+	esac
+	for t in $test
+	do	case " $have " in
+		*" $t "*)
+			;;
+		*)	case " $must " in
+			*" $t "*)
+				echo "$command: $t: not found -- must be on PATH to $action" >&2
+				exit 1
+				;;
+			*)	echo "$command: warning: $t: not found -- some $action actions may fail" >&2
+				;;
+			esac
+			;;
+		esac
+	done
+
+	# verify the top view
+
+	if	test ! -d $PACKAGEROOT/src
+	then	note no source packages to make
+		exit 0
+	elif	test ! -d $INSTALLROOT/src
+	then	note initialize the $INSTALLROOT view
+	fi
+	for i in arch arch/$HOSTTYPE
+	do	test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+	done
+	for i in bin bin/$OK bin/$OK/lib fun include lib lib/package lib/package/gen src man man/man1 man/man3 man/man8
+	do	test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+	done
+	make_recurse src
+	o= k=
+	for i in $makefiles
+	do	case $o in
+		?*)	o="$o -o" k="$k|" ;;
+		esac
+		o="$o -name $i"
+		k="$k$i"
+	done
+	o="( $o ) -print"
+	for d in $package_src
+	do	i=src/$d
+		if	test -d $i
+		then	test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+			make_recurse $i
+			for j in `cd $i; find . $o 2>/dev/null | sed -e 's,^\./,,' -e '/\//!d' -e 's,/[^/]*$,,' | sort -u`
+			do	case $j in
+				$k|$MAKESKIP) continue ;;
+				esac
+				test -d $INSTALLROOT/$i/$j ||
+				$exec mkdir -p $INSTALLROOT/$i/$j || exit
+			done
+		fi
+	done
+	def=
+	for i in $lic
+	do	test -f $i || continue
+		cmp -s $i $INSTALLROOT/$i 2>/dev/null ||
+		$exec cp $PACKAGEROOT/$i $INSTALLROOT/$i
+		for j in `grep '^. .*\.def$' $i`
+		do	case $j in
+			.)	;;
+			*)	case " $def " in
+				*" $i "*)	;;
+				*)		def="$def $i" ;;
+				esac
+				;;
+			esac
+		done
+	done
+	for i in $def
+	do	i=lib/package/$i
+		test -f $i || continue
+		cmp -s $i $INSTALLROOT/$i 2>/dev/null ||
+		$exec cp $PACKAGEROOT/$i $INSTALLROOT/$i
+	done
+
+	# check $CC and { ar cc ld ldd } intercepts
+
+	h="${HOSTTYPE} ${HOSTTYPE}.*"
+	case $HOSTTYPE in
+	*.*)	t=`echo $HOSTTYPE | sed 's/[.][^.]*//'`
+		h="$h $t"
+		;;
+	*)	t=$HOSTTYPE
+		;;
+	esac
+	case $t in
+	*[0123456789])
+		t=`echo $t | sed 's/[0123456789]*$//'`
+		h="$h $t"
+		;;
+	esac
+	case $CC in
+	cc)	c=cc
+		b=$INSTALLROOT/bin/$c
+		t=$INSTALLROOT/lib/package/gen/$c.tim
+		intercept=0
+		for k in $h
+		do	for s in $INITROOT/$c.$k
+			do	test -x "$s" || continue
+				if	cmp -s "$s" "$b" >/dev/null 2>&1
+				then	intercept=1
+					break 2
+				fi
+				case `ls -t "$t" "$b" "$s" 2>/dev/null` in
+				$t*)	;;
+				$b*)	cc=$b
+					;;
+				$s*)	cd $INSTALLROOT/lib/package/gen
+					tmp=pkg$$
+					eval '$'exec echo "'int main(){return 0;}' > $tmp.c"
+					if	$exec $s -o $tmp.exe $tmp.c >/dev/null 2>&1 &&
+						test -x $tmp.exe
+					then	case $HOSTTYPE in
+						*.mips*)$s -version >/dev/null 2>&1 || s= ;;
+						esac
+						case $s in
+						?*)	$exec sed "s/^HOSTTYPE=.*/HOSTTYPE=$HOSTTYPE/" < "$s" > "$b" || exit
+							$exec chmod +x "$b" || exit
+							cc=$b
+							intercept=1
+							note update $b
+							;;
+						esac
+					fi
+					$exec rm -f $tmp.*
+					$exec touch "$t"
+					cd $PACKAGEROOT
+					;;
+				esac
+				break 2
+			done
+		done
+		case $intercept in
+		1)	c=ld
+			b=$INSTALLROOT/bin/$c
+			for k in $h
+			do	for s in $INITROOT/$c.$k
+				do	test -x "$s" || continue
+					case `ls -t "$b" "$s" 2>/dev/null` in
+					$b*)	;;
+					$s*)	$exec cp "$s" "$b"
+						note update $b
+						;;
+					esac
+				done
+			done
+			;;
+		esac
+		;;
+	esac
+	c=ldd
+	b=$INSTALLROOT/bin/$c
+	for t in $h
+	do	s=$INITROOT/$c.$t
+		test -x "$s" || continue
+		onpath $c ||
+		case `ls -t "$b" "$s" 2>/dev/null` in
+		$b*)	;;
+		$s*)	$exec cp "$s" "$b"
+			note update $b
+			;;
+		esac
+	done
+	c=ar
+	b=$INSTALLROOT/bin/$c
+	for t in $h
+	do	s=$INITROOT/$c.$t
+		test -x "$s" || continue
+		case `ls -t "$b" "$s" 2>/dev/null` in
+		$b*)	;;
+		$s*)	$exec cp "$s" "$b"
+			note update $b
+			;;
+		esac
+	done
+# following code stubbed out just in case ar.ibm.risc is needed
+#	c=ar
+#	b=$INSTALLROOT/bin/$c
+#	for t in $h
+#	do	s=$INITROOT/$c.$t
+#		test -x "$s" || continue
+#		onpath $c ||
+#		case `ls -t "$b" "$s" 2>/dev/null` in
+#		$b*)	;;
+#		$s*)	x=`$s -tv /foo/bar.a 2>&1 | egrep -i 'option|usage'`
+#			case $x in
+#			'')	$exec cp "$s" "$b"
+#				note update $b
+#				;;
+#			esac
+#			;;
+#		esac
+#	done
+	case $cc in
+	/*)	;;
+	*)	echo "$command: $CC: not found -- set CC=C-compiler" >&2
+		exit 1
+		;;
+	esac
+	case $exec in
+	'')	cd $INSTALLROOT/lib/package/gen
+		tmp=pkg$$
+		echo 'int main(){return 0;}' > $tmp.c
+		if	$CC -o $tmp.exe $tmp.c > /dev/null 2> $tmp.err &&
+			test -x $tmp.exe
+		then	: ok
+		else	echo "$command: $CC: failed to compile this program:" >&2
+			cat $tmp.c >&2
+			if	test -s $tmp.err
+			then	cat $tmp.err >&2
+			else	echo "$command: $CC: not a C compiler" >&2
+			fi
+			rm -f $tmp.*
+			exit 1
+		fi
+		rm -f $tmp.*
+		cd $PACKAGEROOT
+		;;
+	esac
+
+	# remember the default $CC
+
+	case $CC in
+	cc)	;;
+	*)	if	test -x $INSTALLROOT/bin/cc
+		then	case `sed 1q $INSTALLROOT/bin/cc` in
+			": $CC :")
+				CC=cc
+				export CC
+				;;
+			*)	assign="$assign CC=\"\$CC\""
+				;;
+			esac
+		else	case $CROSS in
+			1)	assign="$assign CC=\"\$CC\""
+				;;
+			*)	case $exec in
+				'')	{
+					echo ": $CC :"
+					echo "$CC \"\$@\""
+					} > $INSTALLROOT/bin/cc
+					chmod +x $INSTALLROOT/bin/cc
+					;;
+				*)	note generate a $INSTALLROOT/bin/cc wrapper for $CC
+					;;
+				esac
+				CC=cc
+				export CC
+				;;
+			esac
+		fi
+		;;
+	esac
+
+	# no $INITROOT means INIT already installed elsewhere
+
+	if	test -d $INITROOT
+	then
+		# update probe scripts
+
+		for i in lib/probe lib/probe/C lib/probe/C/make
+		do	test -d $INSTALLROOT/$i || $exec mkdir $INSTALLROOT/$i || exit
+		done
+		i=$INSTALLROOT/lib/probe/C/make/probe
+		j=$INITROOT/C+probe
+		k=$INITROOT/make.probe
+		case `ls -t $i $j $k 2>/dev/null` in
+		$i*)	;;
+		*)	if	test -f $j -a -f $k
+			then	note update $i
+				shellmagic
+				case $exec in
+				'')	{
+					case $SHELLMAGIC in
+					?*)	echo "$SHELLMAGIC" ;;
+					esac
+					cat $j $k
+					} > $i || exit
+					;;
+				*)	echo "{
+echo $SHELLMAGIC
+cat $j $k
+} > $i"
+					;;
+				esac
+				$exec chmod +x $i || exit
+			fi
+			;;
+		esac
+	fi
+
+	# initialize a few mamake related commands
+
+	checkaout mamake proto ratz release || exit
+
+	# execrate if necessary
+
+	if	(execrate) >/dev/null 2>&1
+	then	execrate=execrate
+		$make cd $INSTALLROOT/bin
+		for i in chmod chgrp cmp cp ln mv rm
+		do	if	test ! -x $OK/$i -a -x /bin/$i.exe
+			then	shellmagic
+				case $exec in
+				'')	echo "$SHELLMAGIC"'execrate /bin/'$i' "$@"' > $OK/$i
+					chmod +x $OK/$i
+					;;
+				*)	$exec echo \'"$SHELLMAGIC"'execrate /bin/'$i' "$@"'\'' >' $OK/$i
+					$exec chmod +x $OK/$i
+					;;
+				esac
+			fi
+		done
+		PATH=$INSTALLROOT/bin/$OK:$PATH
+		export PATH
+	else	execrate=
+	fi
+	case $action in
+	view)	exit 0 ;;
+	esac
+
+	# all work under $INSTALLROOT/src
+
+	$make cd $INSTALLROOT/src
+
+	# record the build host name
+
+	case $noexec in
+	'')	hostinfo name
+		echo "$_hostinfo_" | sed 's,\..*,,' > $PACKAGEBIN/gen/host
+		;;
+	esac
+
+	# make in parallel if possible
+
+	case $NPROC in
+	'')	hostinfo cpu
+		case $_hostinfo_ in
+		0|1)	;;
+		*)	NPROC=$_hostinfo_
+			$show NPROC=$NPROC
+			$show export NPROC
+			export NPROC
+			;;
+		esac
+		;;
+	esac
+
+	# separate flags from target list
+
+	case $target in
+	*-*)	a=
+		for t in $target
+		do	case $t in
+			-[eiknFKNV]*|--*-symbols)
+				makeflags="$makeflags $t"
+				;;
+			-*)	nmakeflags="$nmakeflags $t"
+				;;
+			*)	a="$a $t"
+				;;
+			esac
+		done
+		target=$a
+		;;
+	esac
+
+	# generate nmake first if possible
+
+	if	executable ! $NMAKE && test -d $PACKAGEROOT/src/cmd/nmake
+	then	if	nonmake $MAKE
+		then	note make $NMAKE with mamake
+			c=$CC
+			a=$assign
+			case $HOSTTYPE in
+			win32*|cygwin*)
+				CC="$CC -D_BLD_STATIC"
+				accept="libast"
+				case $assign in
+				*' CC='*)	;;
+				*)		assign="$assign CC=\"\$CC\"" ;;
+				esac
+				;;
+			*)	accept=nmake
+				;;
+			esac
+			eval capture mamake \$makeflags \$nmakeflags \$noexec install nmake $assign
+			assign=$a
+			CC=$c
+			case $make$noexec in
+			'')	if	executable ! $NMAKE
+				then	echo "$command: $action: errors making $NMAKE" >&2
+					exit 1
+				fi
+				;;
+			*)	make=echo
+				;;
+			esac
+			if	test '' != "$PROTOROOT"
+			then	VPATH=$INSTALLROOT:$PACKAGEROOT$USER_VPATH
+				$show VPATH=$VPATH
+				export VPATH
+			fi
+			note believe generated files for $accept
+			eval capture \$NMAKE \$makeflags \$nmakeflags \$noexec recurse believe \$nmakesep $accept $assign
+			$exec touch $INSTALLROOT/bin/.paths
+			note make the remaining targets with $NMAKE
+		else	eval capture $MAKE \$makeflags \$nmakeflags \$noexec install nmake $assign
+			case $make$noexec in
+			'')	if	executable ! $NMAKE
+				then	echo "$command: $action: errors making $NMAKE" >&2
+					exit 1
+				fi
+				;;
+			*)	make=echo
+				;;
+			esac
+		fi
+	fi
+
+	# generate ksh next if possible
+
+	if	nonmake $MAKE
+	then	: no need to generate ksh next -- it could be the only package
+	elif	test "$KEEP_SHELL" != 1 -a -d $PACKAGEROOT/src/cmd/ksh93 && executable ! $KSH
+	then	eval capture nmake $nmakeflags \$makeflags \$noexec install ksh93 $assign
+		case $make$noexec in
+		'')	if	executable ! $KSH
+			then	echo "$command: $action: errors making $KSH" >&2
+				exit 1
+			fi
+			;;
+		*)	make=echo
+			;;
+		esac
+	fi
+
+	# mamprobe data should have been generated by this point
+
+	case $exec in
+	'')	if	test ! -f $INSTALLROOT/bin/.paths -o -w $INSTALLROOT/bin/.paths
+		then	N='
+'
+			b= f= h= n= p= u= B= L=
+			if	test -f $INSTALLROOT/bin/.paths
+			then	exec < $INSTALLROOT/bin/.paths
+				while	read x
+				do	case $x in
+					'#'?*)		case $h in
+							'')	h=$x ;;
+							esac
+							;;
+					*BUILTIN_LIB=*)	b=$x
+							;;
+					*FPATH=*)	f=$x
+							;;
+					*PLUGIN_LIB=*)	p=$x
+							;;
+					*)		case $u in
+							?*)	u=$u$N ;;
+							esac
+							u=$u$x
+							;;
+					esac
+				done
+			fi
+			ifs=$IFS
+			m=
+			case $p in
+			?*)	b=
+				;;
+			esac
+			case $b in
+			?*)	IFS='='
+				set $b
+				IFS=$ifs
+				shift
+				p="PLUGIN_LIB=$*"
+				case $b in
+				[Nn][Oo]*)	p=no$p ;;
+				esac
+				m=1
+				;;
+			esac
+			case $f in
+			'')	f="FPATH=../fun"
+				m=1
+				;;
+			esac
+			case $h in
+			'')	h='# use { no NO } prefix to permanently disable #' ;;
+			esac
+			case $p in
+			'')	p="PLUGIN_LIB=cmd"
+				if	grep '^setv mam_cc_DIALECT .* EXPORT=[AD]LL' $INSTALLROOT/lib/probe/C/mam/* >/dev/null 2>&1
+				then	p=no$p
+				fi
+				m=1
+				;;
+			esac
+			case $m in
+			1)	case $u in
+				?*)	u=$N$u ;;
+				esac
+				echo "$h$N$p$N$f$N$u" > $INSTALLROOT/bin/.paths
+				;;
+			esac
+		fi
+		;;
+	esac
+
+	# run from separate copies since nmake and ksh may be rebuilt
+
+	case $EXECROOT in
+	$INSTALLROOT)
+		$make cd $INSTALLROOT/bin
+		if	executable /bin/cp
+		then	cp=/bin/cp
+		else	cp=cp
+		fi
+		if	executable /bin/mv
+		then	mv=/bin/mv
+		else	mv=mv
+		fi
+		if	executable /bin/rm
+		then	rm=/bin/rm
+		else	rm=rm
+		fi
+		for i in \
+			ksh nmake tee cp ln mv rm \
+			*ast*.dll *cmd*.dll *dll*.dll *shell*.dll
+		do	executable $i && {
+				cmp -s $i $OK/$i 2>/dev/null || {
+					test -f $OK/$i &&
+					$exec $execrate $rm $OK/$i </dev/null
+					test -f $OK/$i &&
+					$exec $execrate $mv $OK/$i $OK/$i.old </dev/null
+					test -f $OK/$i &&
+					case $exec:$i in
+					:nmake|:ksh)
+						echo "$command: $OK/$i: cannot update [may be in use by a running process] remove manually and try again" >&2
+						exit 1
+						;;
+					esac
+					$exec $execrate $cp $i $OK/$i
+				}
+			}
+		done
+		if	test -f ../lib/make/makerules.mo
+		then	cmp -s ../lib/make/makerules.mo $OK/lib/makerules.mo ||
+			$exec $execrate $cp -p ../lib/make/makerules.mo $OK/lib/makerules.mo ||
+			$exec $execrate $cp ../lib/make/makerules.mo $OK/lib/makerules.mo
+		fi
+		if	executable $OK/nmake
+		then	MAKE="$INSTALLROOT/bin/$OK/nmake LOCALRULESPATH=$INSTALLROOT/bin/$OK/lib"
+		fi
+		if	executable $OK/tee
+		then	TEE=$INSTALLROOT/bin/$OK/tee
+		fi
+		if	test "$KEEP_SHELL" != 1 && executable $OK/ksh
+		then	SHELL=$INSTALLROOT/bin/$OK/ksh
+			export SHELL
+		fi
+		case :$PATH: in
+		*:$INSTALLROOT/bin/$OK:*)
+			;;
+		*)	PATH=$INSTALLROOT/bin/$OK:$PATH
+			export PATH
+			;;
+		esac
+		$make cd $INSTALLROOT/src
+		;;
+	esac
+
+	# fall back to mamake if nmake not found or too old
+
+	if	nonmake $MAKE
+	then	note make with mamake
+		case $target in
+		'')	target="install" ;;
+		esac
+		eval capture mamake \$makeflags \$noexec \$target $assign
+	else	case $target in
+		'')	target="install cc-" ;;
+		esac
+		eval capture \$MAKE \$makeflags \$nmakeflags \$noexec recurse \$target \$nmakesep \$package $assign
+	fi
+	;;
+
+read)	case ${PWD:-`pwd`} in
+	$PACKAGEROOT)
+		;;
+	*)	echo "$command: must be in package root directory" >&2
+		exit 1
+		;;
+	esac
+	PAX=
+	if	onpath pax
+	then	case `$_onpath_ -rw --?meter 2>&1` in
+		*--meter*)	PAX=pax ;;
+		esac
+	fi
+	code=0
+	i=
+	x=
+	remove=
+	touch=
+	set '' $target
+	case $2 in
+	lcl|tgz)tgz=$2
+		shift 2
+		target=$*
+		;;
+	*)	tgz=tgz
+		;;
+	esac
+	set '' $package $target
+	case $# in
+	1)	verbose=:
+		set '' `ls lib/package/$tgz/*?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+		;;
+	*)	verbose=
+		;;
+	esac
+	shift
+	files=
+	for f
+	do	if	test -f "$f"
+		then	: ok
+		elif	test -f "lib/package/$tgz/$f"
+		then	f=lib/package/$tgz/$f
+		else	set '' `ls -r ${f}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+			if	test '' != "$2" -a -f "$2"
+			then	f=$2
+			else	set '' `ls -r lib/package/$tgz/${f}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]* 2>/dev/null`
+				if	test '' != "$2" -a -f "$2"
+				then	f=$2
+				else	echo "$command: $f: package archive not found" >&2
+					continue
+				fi
+			fi
+		fi
+		files="$files $f"
+	done
+	case $files in
+	'')	echo "$command: lib/package/$tgz: no package archives" >&2
+		exit 1
+		;;
+	esac
+	set '' `ls -r $files 2>/dev/null`
+	shift
+	f1= f2= f3= f4=
+	for f
+	do	case $f in
+		ratz.*|*/ratz.*)
+			f1="$f1 $f"
+			;;
+		INIT.*|*/INIT.*)
+			f2="$f2 $f"
+			;;
+		INIT*|*/INIT*)
+			f3="$f3 $f"
+			;;
+		*)	f4="$f4 $f"
+			;;
+		esac
+	done
+	gen=
+	set '' $f1 $f2 $f3 $f4
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		f=$1
+		case $f in
+		*.gz)	: standalone packages unbundled manually
+			continue
+			;;
+		*.md5)	: tarball checksum
+			continue
+			;;
+		*?[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]*)
+			;;
+		*)	echo "$command: $f: not a package archive" >&2
+			code=1
+			continue
+			;;
+		esac
+		case $f in
+		*/*)	eval `echo "$f" | sed -e 's,\(.*/\)\(.*\),d=\1 a=\2,'` ;;
+		*)	d= a=$f ;;
+		esac
+		# f:file d:dir a:base p:package v:version r:release t:type
+		eval `echo "$a" | sed -e 's,\.c$,,' -e 's,\.gz$,,' -e 's,\.exe$,,' -e 's,\.tgz$,,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]\([0123456789][0123456789][0123456789][0123456789][^_.]*\)[_.]*\(.*\),p=\1 v=\2 r=\3 t=\4,' -e 's,\([^_.]*\)[_.]\([0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]\)[_.]*\(.*\),p=\1 v=\2 r=base t=\3,'`
+		case $r in
+		base)	y=$p.base ;;
+		*)	y=$p.delta ;;
+		esac
+		case " $x " in
+		*" $y "*)
+			continue
+			;;
+		esac
+		case $t in
+		'')	w=$PACKAGESRC
+			q=
+			Q=
+			m=
+			;;
+		*)	w=$PACKAGEROOT/arch/$t/lib/package
+			q=".$t"
+			Q="_$t"
+			m="[_.]$t"
+			;;
+		esac
+		u=$d$p$q.tim
+		if	test -s "$u"
+		then	continue
+		else	case $force in
+			0)	case `ls -t "$f" "$u" 2>/dev/null` in
+				"$u"*)	case $verbose in
+					1)	note $p already read ;;
+					esac
+					continue
+					;;
+				esac
+				;;
+			esac
+		fi
+		case $p in
+		INIT)	if	test -f $PACKAGEROOT/bin/package
+			then	$exec mv $PACKAGEROOT/bin/package $PACKAGEROOT/bin/package.old
+			fi
+			;;
+		esac
+		z=
+		case $r in
+		base)	# base archive
+			if	test ratz = "$p"
+			then	# ratz packages are not archives
+				case $t in
+				'')	for i in src src/cmd src/cmd/INIT
+					do	test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+					done
+					$exec cp $f $PACKAGEROOT/src/cmd/INIT/$p.c
+					;;
+				*)	for i in arch arch/$t arch/$t/bin
+					do	test -d $PACKAGEROOT/$i || $exec mkdir $PACKAGEROOT/$i || exit
+					done
+					$exec cp $f $PACKAGEROOT/arch/$t/bin/$p &&
+					$exec chmod +x $PACKAGEROOT/arch/$t/bin/$p
+					;;
+				esac
+			elif	test "" != "$PAX"
+			then	$exec pax -L --from=ascii --local -m -ps -rvf "$f" || {
+					code=1
+					continue
+				}
+			else	if	onpath gunzip && onpath $TAR && isascii
+				then	case $TARPROBE in
+					?*)	for i in $TARPROBE
+						do	if	$TAR ${i}f - /dev/null > /dev/null 2>&1
+							then	TARFLAGS=$TARFLAGS$i
+							fi
+						done
+						TARPROBE=
+						;;
+					esac
+					if	gunzip -l < "$f" > /dev/null 2>&1
+					then	case $exec in
+						'')	$exec gunzip < "$f" | $TAR ${TARFLAGS}f - ;;
+						*)	$exec "gunzip < $f | $TAR ${TARFLAGS}f -" ;;
+						esac || {
+							code=1
+							continue
+						}
+					else	$exec $TAR ${TARFLAGS}f "$f" || {
+							code=1
+							continue
+						}
+					fi
+				else	checkaout ratz && onpath ratz || {
+						code=1
+						continue
+					}
+					RATZ=$_onpath_
+					case $exec in
+					'')	echo $f:
+						$exec $RATZ -lm < "$f"
+						;;
+					*)	$exec "$RATZ -lm < $f"
+						;;
+					esac || {
+						code=1
+						continue
+					}
+				fi
+				if	test -f $PACKAGEBIN/gen/$p.sum
+				then	while	read md5 mode usr grp file
+					do	case $file in
+						-*)	file=./$file ;;
+						esac
+						case $mode in
+						[01234567][01234567][01234567][01234567])
+							case $grp in
+							-)	;;
+							*)	$exec chgrp $grp "$file" ;;
+							esac
+							case $usr in
+							-)	;;
+							*)	$exec chown $usr "$file" ;;
+							esac
+							$exec chmod $mode "$file"
+							;;
+						esac
+					done < $PACKAGEBIN/gen/$p.sum
+				fi
+			fi
+			;;
+		*)	# delta archive
+			test "" != "$PAX" || {
+				echo "$command: $f: pax required to read delta archive" >&2
+				code=1
+				continue
+			}
+			case `echo "$v:
+$r:" | sort` in
+			$r:*)	y=$p.base
+				b=${d}${p}_${r}${Q}.tgz
+				test -f "$b" || b=${d}${p}.${r}${q}.tgz
+				test -f "$b" || {
+					case " $gen " in
+					*" $b "*)
+						;;
+					*)	case $# in
+						1)	echo "$command: $f: base archive $b required to read delta" >&2
+							code=1
+							;;
+						*)	shift
+							y=$1
+							shift
+						set '' $y $f "$@"
+						esac
+						continue
+						;;
+					esac
+				}
+				# -m with delta bug fixed 2005-02-08
+				$exec pax -L --from=ascii --local -ps -rvf "$f" -z "$b" || {
+					code=1
+					continue
+				}
+				note $f: generate new base $d$p.$v$q.tgz
+				$exec pax -rf "$f" -z "$b" -wf $d$p.$v$q.tgz -x tgz || {
+					code=1
+					continue
+				}
+				case $exec in
+				'')	echo $p $v $v 1 > $w/gen/$p.ver
+					;;
+				*)	z=$d${p}[_.]$v$q.tgz
+					$exec "echo $p $v $v 1 > $w/gen/$p.ver"
+					gen="$gen $d$p.$v$q.tgz"
+					;;
+				esac
+				case " $remove " in
+				*" $f "*)	;;
+				*)		remove="$remove $f" ;;
+				esac
+				;;
+			*)	b=${d}${p}_${v}${Q}.tgz
+				test -f "$b" || b=${d}${p}.${v}${q}.tgz
+				test -f "$b" || {
+					case " $gen " in
+					*" $b "*)
+						;;
+					*)	case $# in
+						1)	echo "$command: $f: base archive $b required to read delta" >&2
+							code=1
+							;;
+						*)	shift
+							y=$1
+							shift
+							set '' $y $f "$@"
+						esac
+						continue
+						;;
+					esac
+				}
+				# -m with delta bug fixed 2005-02-08
+				$exec pax -L --from=ascii --local -ps -rvf "$f" -z "$b" || {
+					code=1
+					continue
+				}
+				;;
+			esac
+			;;
+		*)	echo "$command: $f: unknown archive type" >&2
+			code=1
+			continue
+			;;
+		esac
+
+		# check for ini files
+
+		if	executable $w/$p.ini
+		then	$exec $w/$p.ini read || {
+				code=1
+				continue
+			}
+		fi
+
+		# add to the obsolete list
+
+		k=
+		for i in `ls $d$p[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.]????$m* $z 2>/dev/null`
+		do	case $i in
+			*.md5)	continue
+				;;
+			$d${p}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789][_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]$m*)
+				;;
+			$d${p}[_.][0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]$m*)
+				continue
+				;;
+			esac
+			case $k in
+			?*)	case " $remove " in
+				*" $k "*)	;;
+				*)		remove="$remove $k" ;;
+				esac
+				;;
+			esac
+			k=$i
+		done
+		x="$x $y"
+		case " $touch " in
+		*" $u "*)	;;
+		*)		touch="$touch $u" ;;
+		esac
+	done
+	if	test ! -f $PACKAGEROOT/bin/package -a -f $PACKAGEROOT/bin/package.old
+	then	$exec cp $PACKAGEROOT/bin/package.old $PACKAGEROOT/bin/package
+	fi
+
+	# drop obsolete archives
+
+	case $remove in
+	?*)	$exec rm -f $remove ;;
+	esac
+
+	# mark the updated archives
+
+	case $touch in
+	?*)	sleep 1; $exec touch $touch ;;
+	esac
+
+	# check the requirements
+
+	case $code$exec in
+	0)	requirements - $x ;;
+	esac
+	exit $code
+	;;
+
+regress)if	test ! -d $PACKAGEBIN/gen
+	then	echo "$command: 'package make' and 'package test' required for regression" >&2
+		exit 1
+	fi
+	dir=$PACKAGEBIN/gen
+	cd $dir
+	for s in out old
+	do	case `ls -t regress.$s test.$s 2>/dev/null` in
+		regress*)
+			;;
+		test*)	if	test -f regress.$s
+			then	$exec mv regress.$s regress.old
+			fi
+			case $exec in
+			'')	egrep -i '\*\*\*|FAIL|^TEST.* [123456789][0123456789]* error|core.*dump' test.$s |
+				sed 	-e '/\*\*\* [0123456789]/d' \
+					-e '/^TEST.\//s,/[^ ]*/,,' \
+					-e 's,[ 	][ 	]*$,,' \
+					-e 's/[0123456789][0123456789]*:* \([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*([abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*[Cc][Oo][Rr][Ee][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789 ]*)\)/\1/' \
+					-e 's/\.sh failed at .* with /.sh failed /' \
+					> regress.$s
+				;;
+			*)	$exec filter test failures from $dir/test.$s to $dir/regress.$s
+				;;
+			esac
+			;;
+		esac
+	done
+	if	test -f regress.out -a -f regress.old
+	then	$exec diff -b regress.out regress.old
+	else	echo "$command: at least 2 test runs required for regression" >&2
+			exit 1
+	fi
+	;;
+
+release)count= lo= hi=
+	checksrc
+	checkaout release || exit
+	requirements source $package
+	components $package
+	package=$_components_
+	set '' $target
+	shift
+	case $# in
+	0)	;;
+	*)	case $1 in
+		-|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+			case $1 in
+			-)	lo= release= ;;
+			*)	lo=$1 release="-f $1" ;;
+			esac
+			shift
+			case $1 in
+			-|[0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]-[0123456789][0123456789]-[0123456789][0123456789])
+				case $1 in
+				-)	hi= ;;
+				*)	hi=$1 release="$release -t $1" ;;
+				esac
+				shift
+				;;
+			esac
+			;;
+		[0123456789]|[0123456789][0123456789]|[0123456789][0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789]|[0123456789][0123456789][0123456789][0123456789][0123456789]*)
+			count=$1
+			release="-r $count"
+			shift
+			;;
+		esac
+		;;
+	esac
+	case $# in
+	0)	case $package in
+		'')	package=* ;;
+		esac
+		;;
+	*)	case $package in
+		'')	package=$*
+			;;
+		*)	echo $command: $*: lo-date hi-date arguments expected >&2
+			exit 1
+			;;
+		esac
+		;;
+	esac
+	echo
+	case $count:$lo:$hi in
+	::)	echo "All recorded changes follow." ;;
+	1::)	echo "Changes since the last release follow." ;;
+	?*::)	echo "Changes since the last $count releases follow." ;;
+	1:?*:)	echo "Changes since $lo or the last release follow." ;;
+	*:?*:*)	echo "Changes since $lo follow." ;;
+	*::?*)	echo "Changes before $hi follow." ;;
+	*)	echo "Changes between $lo and $hi follow." ;;
+	esac
+	x=
+	for r in $INSTALLROOT $PACKAGEROOT
+	do	for s in $package_src
+		do	d=$r/src/$s
+			if	test -d $d
+			then	cd $d
+				for i in $package
+				do	if	test -h $i 2>/dev/null
+					then	continue
+					fi
+					case " $x " in
+					*" $i "*)	continue ;;
+					esac
+					for f in RELEASE CHANGES ChangeLog
+					do	if	test -f $i/$f
+						then	$exec release $release $i/$f
+							x="$x $i"
+							for f in $i/*/$f
+							do	if	test -f $f
+								then	$exec release $release $f
+								fi
+							done
+							break
+						fi
+					done
+				done
+			fi
+		done
+	done
+	;;
+
+remove)	echo "$command: $action: not implemented yet" >&2
+	exit 1
+	;;
+
+results)set '' $target
+	shift
+	def=make
+	dir=$PACKAGEBIN/gen
+	case $verbose in
+	0)	filter=yes ;;
+	*)	filter=cat ;;
+	esac
+	path=0
+	suf=out
+	on=
+	while	:
+	do	case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		--)	shift
+			break
+			;;
+		admin)	dir=$PACKAGESRC/admin
+			;;
+		error*|fail*)
+			filter=errors
+			;;
+		make|test|view|write)
+			def=$1
+			case $filter:$1:$SHELL in
+			errors:*:*)	;;
+			*:test:*/ksh*)	filter=rt ;;
+			esac
+			;;
+		old)	suf=old
+			;;
+		on)	case $# in
+			1)	echo $command: $action: $1: host pattern argument expected >&2
+				exit 1
+				;;
+			esac
+			shift
+			case $on in
+			?*)	on="$on|" ;;
+			esac
+			on="$on$1"
+			;;
+		path)	path=1
+			;;
+		test)	def=test
+			filter=rt
+			;;
+		*)	break
+			;;
+		esac
+		shift
+	done
+	case $dir in
+	*/admin)case $on in
+		'')	on="*" ;;
+		*)	on="@($on)" ;;
+		esac
+		def=$def.log/$on
+		;;
+	esac
+	case $# in
+	0)	set "$def" ;;
+	esac
+	m=
+	t=
+	for i
+	do	k=0
+		eval set '""' $i - $i.$suf - $dir/$i - $dir/$i.$suf -
+		shift
+		for j
+		do	case $j in
+			-)	case $k in
+				1)	continue 2 ;;
+				esac
+				;;
+			*)	if	test -f $j
+				then	k=1
+					case /$j in
+					*/test.*)	t="$t $j" ;;
+					*)		m="$m $j" ;;
+					esac
+				fi
+				;;
+			esac
+		done
+		echo "$command: $i action output not found" >&2
+		exit 1
+	done
+	sep=
+	case $t in
+	?*)	case $path in
+		0)	for j in $t
+			do	echo "$sep==> $j <=="
+				sep=$nl
+				case $filter in
+				cat)	$exec cat $j
+					;;
+				errors)	$exec egrep -i '\*\*\*|FAIL[ES]|^TEST.* [123456789][0123456789]* error|core.*dump' $j | sed -e '/^TEST.\//s,/[^ ]*/,,'
+					;;
+				rt)	$exec $KSH rt - $j
+					;;
+				*)	$exec egrep -i '^TEST|FAIL' $j
+					;;
+				esac
+			done
+			;;
+		1)	echo $t
+			;;
+		esac
+		;;
+	esac
+	case $m in
+	?*)	case $path in
+		0)	case $filter in
+			cat)	cat $m
+				;;
+			*)	if	test -f $HOME/.pkgresults
+				then	i="`cat $HOME/.pkgresults`"
+					case $i in
+					'|'*)	;;
+					*)	i="|$i" ;;
+					esac
+				else	i=
+				fi
+				for j in $m
+				do	echo "$sep==> $j <=="
+					sep=$nl
+					case $filter in
+					errors)	$exeg egrep '^pax:|\*\*\*' $j
+						;;
+					*)	$exec egrep -iv '^($||[\+\[]|cc[^-:]|kill |make.*(file system time|has been replaced)|so|[0123456789]+ error|uncrate |[0123456789]+ block|ar: creat|iffe: test: |conf: (check|generate|test)|[abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_][abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789]*=|gsf@research|ar:.*warning|cpio:|ld:.*(duplicate symbol|to obtain more information)|[0123456789]*$|(checking|creating|touch) [/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_0123456789])| obsolete predefined symbol | is (almost always misused|dangerous|deprecated|not implemented)| trigraph| assigned to | cast .* different size| integer overflow .*<<| optimization may be attained | passed as |::__builtin|pragma.*prototyped|^creating.*\.a$|warning.*not optimized|exceeds size thresh|ld:.*preempts|is unchanged|with value >=|(-l|lib)\*|/(ast|sys)/(dir|limits|param|stropts)\.h.*redefined|usage|base registers|`\.\.\.` obsolete'"$i" $j |
+						$exec grep :
+						;;
+					esac
+				done
+				;;
+			esac
+			;;
+		1)	echo $m
+			;;
+		esac
+	esac
+	;;
+
+test)	requirements source $package
+	components $package
+	package=$_components_
+	case $only in
+	0)	only= ;;
+	1)	only=--recurse=only ;;
+	esac
+
+	# must have nmake
+
+	if	nonmake $MAKE
+	then	echo $command: $action: must have $MAKE to test >&2
+		exit 1
+	fi
+
+	# all work under $INSTALLROOT/src
+
+	$make cd $INSTALLROOT/src
+
+	# disable core dumps (could be disastrous over nfs)
+
+	(ulimit -c 0) > /dev/null 2>&1 && ulimit -c 0
+
+	# do the tests
+
+	eval capture \$MAKE \$makeflags \$noexec \$only recurse test \$target \$nmakesep \$package $assign
+	;;
+
+update)	# download the latest release.version for selected packages
+
+	# all work in $PACKAGEROOT/lib/package/tgz
+
+	if	test ! -d $PACKAGEROOT/lib/package/tgz
+	then	$exec mkdir -p $PACKAGEROOT/lib/package/tgz || exit
+		$exec cd $PACKAGEROOT/lib/package/tgz
+	else	cd $PACKAGEROOT/lib/package/tgz
+	fi
+
+	# get the architectures, update query url, and packages
+
+	set '' $args
+	op=update
+	tgz=tgz
+	source=
+	binary=
+	setup=
+	types=
+	url=
+	urlfile=$default_url
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		--)	shift
+			break
+			;;
+		beta)	op=beta
+			tgz=beta
+			;;
+		binary)	binary=1
+			;;
+		setup)	setup=1
+			;;
+		source)	source=1
+			;;
+		*://*)	url=$1
+			shift
+			break
+			;;
+		*.url)	urlfile=$1
+			if	test ! -s $urlfile
+			then	echo $command: $urlfile: not found >&2; exit 1
+			fi
+			break
+			;;
+		$all_types)
+			binary=1
+			types="$types $1"
+			;;
+		*)	break
+			;;
+		esac
+	done
+	case $source:$binary in
+	:)	source=1 binary=1
+		;;
+	:1)	case $types in
+		'')	types=$HOSTTYPE ;;
+		esac
+		;;
+	esac
+	case $url in
+	'')	case $urlfile in
+		$default_url)
+			if	test ! -s $urlfile
+			then	echo $command: url argument expected >&2; exit 1
+			fi
+			;;
+		*)	default_url=
+			;;
+		esac
+		url=
+		if	grep '^url=' $urlfile >/dev/null
+		then	a=$authorize
+			p=$password
+			case $urlfile in
+			*/*)	;;
+			*)	urlfile=./$urlfile ;;
+			esac
+			. $urlfile
+			case $a:$p in
+			$authorize:$password)
+				default_url=
+				;;
+			*)	case $a in
+				?*)	authorize=$a ;;
+				esac
+				case $p in
+				?*)	password=$p ;;
+				esac
+				;;
+			esac
+		else	url=`cat $urlfile`
+		fi
+		;;
+	esac
+	case $exec in
+	?*)	default_url= ;;
+	esac
+
+	# get the update list
+
+	eval `echo $url | sed 's,\(.*\)://\([^/]*\)/\(.*\),prot=\"\1\" host=\"\2\" dir=\"\3\",'`
+	get $host $dir/$op.html
+
+	# get/check the package names
+
+	case " $* " in
+	*" - "*)case $source in
+		1)	source_packages=$* ;;
+		*)	source_packages= ;;
+		esac
+		case $binary in
+		1)	binary_packages=$* ;;
+		*)	binary_packages= ;;
+		esac
+		package_hit=$*
+		;;
+	"  ")	nl="
+"
+		case $source in
+		1)	p=
+			for f in `ls *.????-??-??.* 2>/dev/null`
+			do	case $f in
+				*.????-??-??.????-??-??.*.*)
+					;;
+				*.????-??-??.????-??-??.*)
+					p=$p$nl$f
+					;;
+				*.????-??-??.*.*)
+					;;
+				*.????-??-??.*)
+					p=$p$nl$f
+					;;
+				esac
+			done
+			set '' `echo "$p" | sed 's,\..*,,' | sort -u`
+			shift
+			source_packages=$*
+			;;
+		*)	source_packages=
+			;;
+		esac
+		case $binary in
+		1)	p=
+			for f in `ls *.????-??-??.* 2>/dev/null`
+			do	case $f in
+				*.????-??-??.????-??-??.*.*)
+					p=$p$nl$f
+					;;
+				*.????-??-??.????-??-??.*)
+					;;
+				*.????-??-??.*.*)
+					p=$p$nl$f
+					;;
+				*.????-??-??.*)
+					;;
+				esac
+			done
+			set '' `echo "$p" | sed 's,\..*,,' | sort -u`
+			shift
+			binary_packages=$*
+			;;
+		*)	binary_packages=
+			;;
+		esac
+		package_hit="$source_packages $binary_packages"
+		;;
+	*)	case $source in
+		1)	source_packages=$* ;;
+		*)	source_packages= ;;
+		esac
+		case $binary in
+		1)	binary_packages=$* ;;
+		*)	binary_packages= ;;
+		esac
+		package_hit=
+		;;
+	esac
+
+	# get the latest updates
+
+	types_test=
+	types_local=
+	dir=$dir/$tgz
+	case $default_url in
+	?*)	echo "url='$url' authorize='$authorize' password='$password'" > $default_url
+		case $authorize in
+		?*)	chmod go-rwx $default_url ;;
+		esac
+		;;
+	esac
+	echo "$got" > got.tmp
+	case $only in
+	0)	exec < got.tmp
+		covered=
+		while	read name suffix type base base_size delta delta_size sync sync_size requires covers base_sum delta_sum sync_sum comment
+		do	case $requires in
+			''|-*)	continue ;;
+			esac
+			IFS=:
+			set '' $requires
+			IFS=$ifs
+			case $type in
+			-)	case " $source_packages " in
+				*" $name "*|*" - "*)
+					for name
+					do	case " $source_packages " in
+						*" $name "*)
+							;;
+						*)	source_packages="$source_packages $name"
+							covered=$covered:$covers
+							;;
+						esac
+					done
+					;;
+				esac
+				;;
+			*)	case " $binary_packages " in
+				*" $name "*|*" - "*)
+					for name
+					do	case " $binary_packages " in
+						*" $name "*)
+							;;
+						*)	binary_packages="$binary_packages $name"
+							covered=$covered:$covers
+							;;
+						esac
+					done
+					;;
+				esac
+				;;
+			esac
+		done
+		case $covered in
+		?*)	x=$source_packages
+			source_packages=
+			for name in $x
+			do	case :$covered: in
+				*:$name:*)	;;
+				*)		source_packages="$source_packages $name" ;;
+				esac
+			done
+			x=$binary_packages
+			binary_packages=
+			for name in $x
+			do	case :$covered: in
+				*:$name:*)	;;
+				*)		binary_packages="$binary_packages $name" ;;
+				esac
+			done
+			;;
+		esac
+		;;
+	esac
+	checksum=
+	for i in $checksum_commands
+	do	case `( $i ) < /dev/null 2> /dev/null` in
+		${checksum_empty}|${checksum_empty}[\ \	]*)
+			checksum=$i
+			break
+			;;
+		esac
+	done
+	case $checksum in
+	'')	echo $command: warning: '{' $checksum_commands '}' command not found -- only download sizes will be checked >&2 ;;
+	esac
+	exec < got.tmp
+	while	read name suffix type base base_size delta delta_size sync sync_size requires covers base_sum delta_sum sync_sum comment
+	do	case $verbose in
+		1)	case $type in
+			-)	i= ;;
+			*)	i=.$type ;;
+			esac
+			j="$name.$base$i.$suffix"
+			case $delta in
+			-)	j="$j -" ;;
+			*)	j="$j $name.$base.$delta$i.$suffix" ;;
+			esac
+			case $sync in
+			-)	j="$j -" ;;
+			*)	j="$j $name.$base.$sync$i.$suffix" ;;
+			esac
+			echo $command: $j $base_size:$base_sum $delta_size:$delta_sum $sync_size:$sync_sum $requires >&2
+		esac
+		case " $package_hit " in
+		*" $name "*|*" - "*)
+			;;
+		*)	package_hit="$package_hit $name"
+			;;
+		esac
+		case $type in
+		-)	case " $source_packages " in
+			*" $name "*|*" - "*)
+				if	test -s $name.tim
+				then	continue
+				fi
+				lcl=$name.$base.$suffix
+				if	test -f $lcl
+				then	case $checksum:$base_sum in
+					:*|*:-)	size=`wc -c < $lcl | sed 's, ,,g'` sum=$base_sum ;;
+					*)	size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'` ;;
+					esac
+				else	size=X sum=X
+				fi
+				if	test "0" != "$force" -a "X-" = "X$delta" -o "$base_size" != "$size" -o "$base_sum" != "$sum"
+				then	rmt=
+					case $sync:$sync_size in
+					-*|*[-:])
+						;;
+					*)	lcl=$name.$base.$sync.$suffix
+						if	test -f $lcl
+						then	rmt=1
+							get $host $dir $lcl $sync_size $sync_sum
+						fi
+						;;
+					esac
+					case $base:$base_size in
+					-*|*[-:])
+						;;
+					*)	case $rmt in
+						'')	lcl=$name.$base.$suffix
+							get $host $dir $lcl $base_size $base_sum
+							;;
+						esac
+						;;
+					esac
+				fi
+				case $delta:$delta_size in
+				-*|*[-:])
+					;;
+				*)	lcl=$name.$delta.$base.$suffix
+					if	test -f $lcl
+					then	case $checksum:$delta_sum in
+						:*|*:-)	size=`wc -c < $lcl | sed 's, ,,g'` sum=$delta_sum ;;
+						*)	size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'` ;;
+						esac
+					else	size=X sum=X
+					fi
+					if	test "0" != "$force" -o "$delta_size" != "$size" -o "$delta_sum" != "$sum"
+					then	get $host $dir $lcl $delta_size $delta_sum
+					fi
+					;;
+				esac
+				;;
+			esac
+			;;
+		*)	case " $binary_packages " in
+			*" $name "*|*" - "*)
+				if	test -s $name.$type.tim
+				then	continue
+				fi
+				case " $types " in
+				*" - "*);;
+				"  ")	case " $types_test " in
+					*" $type "*)
+						;;
+					*)	types_test="$types_test $type"
+						for i in *.????-??-??.$type.* *.????-??-??.????-??-??.$type.*
+						do	if	test -f $i
+							then	types_local="$types_local $type"
+							fi
+							break
+						done
+						;;
+					esac
+					case " $types_local " in
+					*" $type "*)
+						;;
+					*)	continue
+						;;
+					esac
+					;;
+				*)	case " $types " in
+					*" $type "*)
+						;;
+					*)	continue
+						;;
+					esac
+					;;
+				esac
+				lcl=$name.$base.$type.$suffix
+				if	test -f $lcl
+				then	case $checksum:$base_sum in
+					:*|*:-)	size=`wc -c < $lcl | sed 's, ,,g'` sum=$base_sum ;;
+					*)	size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'` ;;
+					esac
+				else	size=X sum=X
+				fi
+				if	test "0" != "$force" -a "X-" = "X$delta" -o "$base_size" != "$size" -o "$base_sum" != "$sum"
+				then	rmt=
+					case $sync:$sync_size in
+					-*|*[-:])
+						;;
+					*)	lcl=$name.$base.$sync.$type.$suffix
+						if	test -f $lcl
+						then	rmt=1
+							get $host $dir $lcl $sync_size $sync_sum
+						fi
+						;;
+					esac
+					case $base:$base_size in
+					-*|*[-:])
+						;;
+					*)	case $rmt in
+						'')	lcl=$name.$base.$type.$suffix
+							get $host $dir $lcl $base_size $base_sum
+							;;
+						esac
+						;;
+					esac
+				fi
+				case $delta:$delta_size in
+				-*|*[-:])
+					;;
+				*)	lcl=$name.$delta.$base.$type.$suffix
+					if	test -f $lcl
+					then	sum=`$checksum < $lcl | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'`
+					else	sum=X
+					fi
+					if	test -f $lcl
+					then	case $checksum:$delta_sum in
+						:*|*:-)	size=`wc -c < $lcl | sed 's, ,,g'` sum=$delta_sum ;;
+						*)	size=$base_size sum=`$checksum < $lcl | sed -e 's,^[ 	][ 	]*,,' -e 's,[ 	].*,,'` ;;
+						esac
+					else	size=X sum=X
+					fi
+					if	test "0" != "$force" -o "$delta_size" != "$size" -o "$delta_sum" != "$sum"
+					then	get $host $dir $lcl $delta_size $delta_sum
+					fi
+					;;
+				esac
+				;;
+			esac
+			;;
+		esac
+	done
+	closure=
+	for name in $source_packages $binary_packages
+	do	case $name in
+		-)	;;
+		*)	case " $package_hit " in
+			*" $name "*)
+				case $setup in
+				1)	case " $closure " in
+					*" $name "*)
+						;;
+					*)	closure="$closure $name"
+						;;
+					esac
+					;;
+				esac
+				;;
+			*)	echo $command: $name: unknown package >&2
+				;;
+			esac
+			;;
+		esac
+	done
+	exec <&-
+	rm -f got.tmp
+	case $closure in
+	?*)	echo $closure ;;
+	esac
+	;;
+
+use)	# finalize the environment
+
+	x=:..
+	for d in `( cd $PACKAGEROOT; ls src/*/Mamfile 2>/dev/null | sed 's,/[^/]*$,,' | sort -u )`
+	do	x=$x:$INSTALLROOT/$d
+	done
+	x=$x:$INSTALLROOT
+	case $CDPATH: in
+	$x:*)	;;
+	*)	CDPATH=$x:$CDPATH
+		$show CDPATH=$CDPATH
+		$show export CDPATH
+		export CDPATH
+		;;
+	esac
+	P=$PACKAGEROOT
+	$show P=$P
+	$show export P
+	export P
+	A=$INSTALLROOT
+	$show A=$A
+	$show export A
+	export A
+	case $NPROC in
+	'')	hostinfo cpu
+		case $_hostinfo_ in
+		0|1)	;;
+		*)	NPROC=$_hostinfo_
+			$show NPROC=$NPROC
+			$show export NPROC
+			export NPROC
+			;;
+		esac
+		;;
+	esac
+	eval PACKAGE_USE=$package_use
+	export PACKAGE_USE
+
+	# run the command
+
+	case $run in
+	'')	case $show in
+		':')	$exec exec $SHELL ;;
+		esac
+		;;
+	*)	$exec exec $SHELL -c "$run"
+		;;
+	esac
+	;;
+
+verify)	cd $PACKAGEROOT
+	requirements binary $package
+	if	executable ! $SUM
+	then	echo "$command: $action: $SUM command required" >&2
+		exit 1
+	fi
+	case $target in
+	'')	cd arch
+		set '' *
+		shift
+		target=$*
+		cd ..
+		;;
+	esac
+	code=0
+	for a in $target
+	do	case $package in
+		'')	set '' arch/$a/lib/package/gen/*.sum
+			shift
+			if	test -f $1
+			then	for i
+				do	package_verify $i || code=1
+				done
+			else	echo "$command: warning: $a: no binary packages" >&2
+			fi
+			;;
+		*)	for i in $package
+			do	if	test -f arch/$a/lib/package/gen/$i.sum
+				then	package_verify arch/$a/lib/package/gen/$i.sum || code=1
+				else	echo "$command: warning: $a: no binary package for $i" >&2
+				fi
+			done
+			;;
+		esac
+	done
+	exit $code
+	;;
+
+write)	set '' $target
+	shift
+	action=
+	list=
+	qualifier=
+	while	:
+	do	case $1 in
+		base|closure|delta|exp|lcl|pkg|rpm|tgz)
+			qualifier="$qualifier $1"
+			;;
+		binary)	action=$1
+			type=$HOSTTYPE
+			eval list=$PACKAGESRC/tgz/$admin_list
+			;;
+		cyg)	qualifier="$qualifier $1"
+			assign="$assign closure=1"
+			only=1
+			;;
+		runtime|source)
+			action=$1
+			;;
+		tst)	qualifier="$qualifier tgz"
+			assign="$assign copyright=0 'PACKAGEDIR=\$(PACKAGESRC)/tst'"
+			;;
+		nocopyright)
+			assign="$assign copyright=0"
+			;;
+		*)	break
+			;;
+		esac
+		shift
+	done
+	case $action in
+	'')	echo "$command: binary or source operand expected" >&2
+		exit 1
+		;;
+	esac
+	set '' "$@" $package
+	shift
+	case $only in
+	0)	set '' `order "$@"`
+		shift
+		;;
+	esac
+	case $# in
+	0)	echo "$command: at least one package name expected" >&2
+		exit 1
+		;;
+	esac
+	if	nonmake $MAKE
+	then	echo "$command: must have $MAKE to generate archives" >&2
+		exit 1
+	fi
+
+	# all work under $PACKAGEBIN
+
+	$make cd $PACKAGEBIN
+	case $list in
+	?*)	$exec rm -f $list ;;
+	esac
+
+	# go for it
+
+	for package
+	do	if	view - all $package.pkg || view - all lib/package/$package.pkg
+		then	eval capture \$MAKE \$makeflags -X ignore \$noexec -f \$package.pkg \$qualifier \$action $assign
+		else	echo "$command: $package: not a package" >&2
+		fi
+	done
+	;;
+
+TEST)	set '' $target $package
+	shift
+	case $1 in
+	binary|source)
+		action=$1
+		shift
+		;;
+	esac
+	order "$@"
+	;;
+
+*)	echo "$command: $action: internal error" >&2
+	exit 1
+	;;
+
+esac
+
+exit "$error_status"

+ 54 - 0
cde/programs/dtksh/ksh93/bin/shtests

@@ -0,0 +1,54 @@
+#! /bin/sh
+# Wrapper script to run the ksh93 regression tests without requiring nmake.
+# By Martijn Dekker <martijn@inlv.org> 2020-05-14
+# Public domain. http://creativecommons.org/publicdomain/zero/1.0/
+#
+# The manual: bin/shtests --man
+# Brief help: bin/shtests --help
+#
+# By default, this runs your compiled arch/*/bin/ksh.
+#
+# Note: The test suite actually uses $SHELL to indicate the shell to test. But
+# we cannot use the $SHELL environment value on entry to this wrapper script,
+# as that is already used for the user's default login shell on most systems.
+
+# Process and remove any assignment-argument indicating the shell to test
+for arg do
+	case $arg in
+	( SHELL=* | KSH=* )
+		KSH=${arg#*=} ;;
+	( * )	set -- "$@" "$1" ;;
+	esac
+	shift
+done
+
+# Find root dir of ksh source
+mydir=$(dirname "$0") \
+&& mydir=$(CDPATH='' cd -P -- "$mydir/.." && printf '%sX' "$PWD") \
+&& mydir=${mydir%X} \
+|| exit
+myarch=$("$mydir/bin/package" host type) || exit
+
+# Check if there is a ksh to test.
+case ${KSH+set} in
+( '' )	KSH=$mydir/arch/$myarch/bin/ksh ;;
+esac
+if ! test -x "$KSH" || ! test -f "$KSH"; then
+	printf '%s: shell not found: %s\n' "${0##*/}" "$KSH" >&2
+	printf 'Specify a shell like:  KSH=path/to/ksh bin/shtests\n' >&2
+	exit 1
+fi
+
+# Ensure absolute path to ksh
+KSH=$(CDPATH='' cd -P -- "$(dirname "$KSH")" \
+	&& printf '%s/%sX' "$PWD" "${KSH##*/}") \
+&& KSH=${KSH%X}
+
+# Run the test suite
+CDPATH='' cd -P -- "$mydir/src/cmd/ksh93/tests" || exit
+SHELL=$KSH
+INSTALLROOT=${INSTALLROOT:-$mydir/arch/$myarch}
+export SHELL INSTALLROOT
+unset -v KSH
+printf '#### Regression-testing %s ####\n' "$SHELL"
+exec "$SHELL" shtests "$@"

+ 41 - 0
cde/programs/dtksh/ksh93/bin/silent

@@ -0,0 +1,41 @@
+########################################################################
+#                                                                      #
+#               This software is part of the ast package               #
+#          Copyright (c) 1994-2011 AT&T Intellectual Property          #
+#                      and is licensed under the                       #
+#                 Eclipse Public License, Version 1.0                  #
+#                    by AT&T Intellectual Property                     #
+#                                                                      #
+#                A copy of the License is available at                 #
+#          http://www.eclipse.org/org/documents/epl-v10.html           #
+#         (with md5 checksum b35adb5213ca9657e911e9befb180842)         #
+#                                                                      #
+#              Information and Software Systems Research               #
+#                            AT&T Research                             #
+#                           Florham Park NJ                            #
+#                                                                      #
+#                 Glenn Fowler <gsf@research.att.com>                  #
+#                                                                      #
+########################################################################
+# non-ksh stub for the nmake silent prefix
+# @(#)silent (AT&T Research) 1992-08-11
+
+(command set -o posix) 2>/dev/null && set -o posix
+modern_export=`v=; export v=ok 2>/dev/null; echo "$v"`
+
+while	:
+do	case $# in
+	0)	exit 0 ;;
+	esac
+	case $1 in
+	*=*)	case $modern_export in
+		ok)	export "$1" ;;
+		*)	`echo $1 | sed "s/\\([^=]*\\)=\\(.*\\)/eval \\1='\\2'; export \\1/"` ;;
+		esac
+		shift
+		;;
+	*)	break
+		;;
+	esac
+done
+"$@"

+ 6 - 0
cde/programs/dtksh/ksh93/docs/index.html

@@ -0,0 +1,6 @@
+<html>
+<head><title>AST Software</title></head>
+<body>
+<a href='ksh/index.html'>The KornShell</a><br>
+</body>
+</html>

+ 710 - 0
cde/programs/dtksh/ksh93/docs/ksh/builtins.html

@@ -0,0 +1,710 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<TITLE> www/ksh/builtins.mm mm document </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ float:left; clear:both; }
+dd	{ margin-left:3em; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+<P>
+<CENTER>
+<H3><CENTER><FONT color=red><FONT face=courier>Guidelines for writing <TT>ksh-93</TT> built-in commands</FONT></FONT></CENTER></H3>
+<BR>David G. Korn
+<P><I></I>
+</CENTER>
+<P>
+<CENTER><FONT color=red><FONT face=courier><H3 align=center><A name="Abstract">Abstract</A></H3></FONT></FONT></CENTER>
+One of the features of <TT>ksh93</TT>, the latest version of <TT>ksh</TT>,
+is the ability to add built-in commands at run time.
+This feature only works on operating systems that have the ability
+to load and link code into the current process at run time.
+Some examples of the systems that have this feature
+are Linux, System V Release 4, Solaris, Sun OS, HP-UX Release 8 and above,
+AIX 3.2 and above, and Microsoft Windows systems. 
+<P>
+This memo describes how to write and compile programs
+that can be loaded into <TT>ksh</TT> at run  time as built-in
+commands.
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="INTRODUCTION">INTRODUCTION</A></H3></FONT></FONT></CENTER>
+A built-in command is executed without creating a separate process.
+Instead, the command is invoked as a C function by <TT>ksh</TT>. 
+If this function has no side effects in the shell process,
+then the behavior of this built-in is identical to that of
+the equivalent stand-alone command.  The primary difference
+in this case is performance.  The overhead of process creation
+is eliminated.  For commands of short duration, the effect
+can be dramatic.  For example, on SUN OS 4.1, the time to
+run <TT>wc</TT> on a small file of about 1000 bytes, runs
+about 50 times faster as a built-in command.
+<P>
+In addition, built-in commands may have side effects on the
+shell environment.
+This is usually done to extend the application domain for
+shell programming.  For example, there is a group of X-windows extension
+built-ins that make heavy use of the shell variable namespace.
+These built-ins are added at run time and
+result in a windowing shell that can be used to write
+X-windows applications.
+<P>
+While there are definite advantages to adding built-in
+commands, there are some disadvantages as well.
+Since the built-in command and <TT>ksh</TT> share the same
+address space, a coding error in the built-in program
+may affect the behavior of <TT>ksh</TT>; perhaps causing
+it to core dump or hang.
+Debugging is also more complex since your code is now
+a part of a larger entity.
+The isolation provided by a separate process
+guarantees that all resources used by the command
+will be freed when the command completes.
+Resources used by a built-in must be meticulously maintained and freed.
+Also, since the address space of <TT>ksh</TT> will be larger when built-in are loaded,
+it may increase the time it takes <TT>ksh</TT> to fork() and
+exec() non-built-in commands.
+It makes no sense to add a built-in command that takes
+a long time to run or that is run only once, since the performance
+benefits will be negligible.
+Built-ins that have side effects in the current shell
+environment have the disadvantage of increasing the
+coupling between the built-in and <TT>ksh</TT>, making
+the overall system less modular and more monolithic.
+<P>
+Despite these drawbacks, in many cases extending
+<TT>ksh</TT> by adding built-in
+commands makes sense and allows reuse of the shell
+scripting ability in an application specific domain.
+This memo describes how to write <TT>ksh</TT> extensions. 
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="WRITING BUILT-IN COMMANDS">WRITING BUILT-IN COMMANDS</A></H3></FONT></FONT></CENTER>
+There is a development kit available for writing <TT>ksh</TT>
+built-ins as part of the AST (AT&amp;T Software Technology) Toolkit.
+The development kit has three directories,
+<TT>include</TT>, <TT>lib</TT>, and <TT>bin</TT>.
+It is best to set the value of the environment variable
+<TT>PACKAGE_ast</TT> to the pathname of the directory
+containing the development kit.
+The <TT>include</TT> directory contains a sub-directory
+named <TT>ast</TT> that contains interface prototypes
+for functions that you can call from built-ins.  The <TT>lib</TT>
+directory contains the <TT>ast</TT> library
+and a library named <TT>cmd</TT> that contains a version
+of several of the standard POSIX<FONT SIZE=-6>[1]</FONT>
+utilities that can be made run time built-ins.
+The <TT>lib/ksh</TT> directory contains shared libraries
+that implement other <TT>ksh</TT> built-ins.
+The <TT>bin</TT> directory contains build tools such as <TT>nmake</TT><FONT SIZE=-6>[2]</FONT>.
+To add built-ins at runtime, it is necessary to build a shared library
+containing one or more built-ins that you wish to add.
+The built-ins are then added by running <TT>builtin &#45;f</TT> <EM>shared_lib</EM>.
+Since the procedure for building share libraries is system dependent,
+it is best to use
+<TT>nmake</TT>
+using the sample nmake makefile below as a prototype.
+The AST Toolkit also contains some examples of built-in libraries under
+the <TT>src/cmd/kshlib</TT> directory.
+<P>
+There are two ways to code adding built-ins.  One method is to replace
+the function <TT>main</TT> with a function
+<TT>b_</TT><EM>name</EM>, where <EM>name</EM> is the name
+of the built-in you wish to define.
+A built-in command has a calling convention similar to
+the <TT>main</TT> function of a program,
+<TT>int main(int argc, char *argv&#0091;&#0093;)</TT>.
+except that it takes a third argument of type <TT>Shbltin_t*</TT> which can
+be passed as <TT><FONT SIZE=-1>NULL</FONT></TT> if it is not used.  The definition for
+<TT>Shbltin_t*</TT> is in <TT>&lt;ast/shcmd.h&gt;</TT>.
+Instead of <TT>exit</TT>, you need to use <TT>return</TT>
+to terminate your command.
+The return value will become the exit status of the command.
+The <TT>open</TT> built-in, installed in <TT>lib/ksh</TT> in the AST Toolkit, uses this method.
+The <TT>Shbltin_t</TT> structure contains a field named <TT>shp</TT> which is
+a pointer the the shell data that is needed for <TT>shell</TT> library callbacks.
+It also contains the fields, <TT>shrun</TT>, <TT>shtrap</TT>, <TT>shexit</TT>,
+and <TT>shbltin</TT>
+that are function pointers to the <TT>shell</TT> library functions <TT>sh_run</TT>, <TT>sh_trap</TT>
+<TT>sh_exit</TT>, and <TT>sh_addbuiltin</TT>, respectively. These functions
+can be invoked without the need for runtime symbol lookup when the
+shell is statically linked with <TT>libshell</TT>.
+<P>
+The alternative method is to create a function <TT>lib_init</TT> and
+use the <TT>Shbltin_t.shbltin()</TT> function to add one or more built-ins.
+The <TT>lib_init</TT> function will be called with two arguments.  The
+first argument will be 0 when the library is loaded and the second
+argument will be of type <TT>Shbltin_t*</TT>.
+The <TT>dbm_t</TT> and <TT>dss</TT> shell built-ins use this method.
+<P>
+No matter which way you add built-ins you should add the line
+<TT>SHLIB(</TT><EM>identifier</EM><TT>)</TT> as the last line of one
+of the built-in source file, where <EM>identifier</EM> is any C identifier.
+This line provides version information to the shell <TT>builtin</TT> command
+that it uses to verify compatibility between the built-in and <TT>ksh</TT>
+implementation versions. <TT>builtin</TT> fails with a diagnostic on version 
+mismatch. The diagnostic helps determine whether <TT>ksh</TT> is out of
+date and requires an upgrade or the built-in is out of date and requires
+recompilation.
+<P>
+The steps necessary to create and add a run time built-in are
+illustrated in the following simple example.
+Suppose you wish to add a built-in command named <TT>hello</TT>
+which requires one argument and prints the word hello followed
+by its argument.  First, write the following program in the file
+<TT>hello.c</TT>:
+<DIV class=FI>
+<PRE>
+#include     &lt;stdio.h&gt;
+int b_hello(int argc, char *argv&#0091;&#0093;, void *context)
+{
+        if(argc != 2)
+        {
+                fprintf(stderr,"Usage: hello arg&#0092;n");
+                return(2);
+        }
+        printf("hello %s&#0092;n",argv&#0091;1&#0093;);
+        return(0);
+}
+SHLIB(hello)
+</DIV>
+</PRE>
+<P>
+Next, the program needs to be compiled.
+If you are building with AT&amp;T <TT>nmake</TT> use the following <TT>Makefile</TT>:
+<DIV class=FI>
+<PRE>
+:PACKAGE: --shared ast
+hello plugin=ksh :LIBRARY: hello.c
+</DIV>
+</PRE>
+and run <TT>nmake install</TT> to compile, link, and install the built-in shared library
+in <TT>lib/ksh/</TT> under <TT>PACKAGE_ast</TT>.
+If the built-in extension uses several <TT>.c</TT> files, list all of these on
+the <TT>:LIBRARY:</TT> line.
+<P>
+Otherwise you will have to compile <TT>hello.c</TT> with an option
+to pick up the AST include directory
+(since the AST <TT>&lt;stdio.h&gt;</TT> is required for <TT>ksh</TT> compatibility)
+and options required for generating shared libraries.
+For example, on Linux use this to compile:
+<DIV class=FI>
+<PRE>
+cc -fpic -I$PACKAGE_ast/include/ast -c hello.c
+</DIV>
+</PRE>
+and use the appropriate link line.
+It really is best to use <TT>nmake</TT> because the 2 line Makefile above
+will work on all systems that have <TT>ksh</TT> installed.
+<P>
+If you have several built-ins, it is desirable
+to build a shared library that contains them all.
+<P>
+The final step is using the built-in.
+This can be done with the <TT>ksh</TT> command <TT>builtin</TT>.
+To load the shared library <TT>libhello.so</TT> from the current directory
+and add the built-in <TT>hello</TT>, invoke the command,
+<DIV class=FI>
+<PRE>
+builtin -f ./libhello.so hello
+</DIV>
+</PRE>
+The shared library prefix (<TT>lib</TT> here) and suffix (<TT>.so</TT> here) be omitted;
+the shell will add an appropriate suffix
+for the system that it is loading from.
+If you install the shared library in <TT>lib/ksh/</TT>, where <TT>../lib/ksh/</TT> is
+a directory on <STRONG>$PATH</STRONG>, the command
+<DIV class=FI>
+<PRE>
+builtin -f hello hello
+</DIV>
+</PRE>
+will automatically find, load and install the built-in on any system.
+Once this command has been invoked, you can invoke <TT>hello</TT>
+as you do any other command. 
+If you are using <TT>lib_init</TT> method to add built-ins then no arguments
+follow the <TT>&#45;f</TT> option.
+<P>
+It is often desirable to make a command <EM>built-in</EM>
+the first time that it is referenced.  The first
+time <TT>hello</TT> is invoked, <TT>ksh</TT> should load and execute it,
+whereas for subsequent invocations <TT>ksh</TT> should just execute the built-in.
+This can be done by creating a file named <TT>hello</TT>
+with the following contents:
+<DIV class=FI>
+<PRE>
+function hello
+{
+        unset -f hello
+        builtin -f hello hello
+        hello "$@"
+}
+</DIV>
+</PRE>
+This file <TT>hello</TT> needs to be placed in a directory that is
+in your <STRONG><FONT SIZE=-1>FPATH</FONT></STRONG> variable, and the built-in shared library
+should be installed in <TT>lib/ksh/</TT>, as described above.
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="CODING REQUIREMENTS AND CONVENTIONS">CODING REQUIREMENTS AND CONVENTIONS</A></H3></FONT></FONT></CENTER>
+As mentioned above, the entry point for built-ins must either be of
+the form <TT>b_</TT><EM>name</EM> or else be loaded from a function named
+<TT>lib_init</TT>.
+Your built-ins can call functions from the standard C library,
+the <TT>ast</TT> library, interface functions provided by <TT>ksh</TT>,
+and your own functions.
+You should avoid using any global symbols beginning with
+<STRONG>sh_</STRONG>,
+<STRONG>nv_</STRONG>,
+and
+<STRONG>ed_</STRONG>
+since these are used by <TT>ksh</TT> itself.
+<TT>#define</TT> constants in <TT>ksh</TT> interface
+files use symbols beginning with <TT>SH_</TT> and <TT>NV_</TT>,
+so avoid using names beginning with these too.
+<P>
+<H4><A name="Header Files">Header Files</A></H4>
+The development kit provides a portable interface
+to the C library and to libast.
+The header files in the development kit are compatible with
+K&amp;R C<FONT SIZE=-6>[3]</FONT>,
+ANSI-C<FONT SIZE=-6>[4]</FONT>,
+and C++<FONT SIZE=-6>[5]</FONT>.
+<P>
+The best thing to do is to include the header file <TT>&lt;shell.h&gt;</TT>.
+This header file causes the <TT>&lt;ast.h&gt;</TT> header, the
+<TT>&lt;error.h&gt;</TT> header and the <TT>&lt;stak.h&gt;</TT>
+header to be included as well as defining prototypes
+for functions that you can call to get shell
+services for your builtins.
+The header file <TT>&lt;ast.h&gt;</TT>
+provides prototypes for many <STRONG>libast</STRONG> functions
+and all the symbol and function definitions from the
+ANSI-C headers, <TT>&lt;stddef.h&gt;</TT>,
+<TT>&lt;stdlib.h&gt;</TT>, <TT>&lt;stdarg.h&gt;</TT>, <TT>&lt;limits.h&gt;</TT>,
+and <TT>&lt;string.h&gt;</TT>.
+It also provides all the symbols and definitions for the
+POSIX<FONT SIZE=-6>[6]</FONT>
+headers <TT>&lt;sys/types.h&gt;</TT>, <TT>&lt;fcntl.h&gt;</TT>, and
+<TT>&lt;unistd.h&gt;</TT>.
+You should include <TT>&lt;ast.h&gt;</TT> instead of one or more of
+these headers.
+The <TT>&lt;error.h&gt;</TT> header provides the interface to the error
+and option parsing routines defined below.
+The <TT>&lt;stak.h&gt;</TT> header provides the interface to the memory
+allocation routines described below.
+<P>
+Programs that want to use the information in <TT>&lt;sys/stat.h&gt;</TT>
+should include the file <TT>&lt;ls.h&gt;</TT> instead.
+This provides the complete POSIX interface to <TT>stat()</TT>
+related functions even on non-POSIX systems.
+<P>
+<P>
+<H4><A name="Input/Output">Input/Output</A></H4>
+<TT>ksh</TT> uses <STRONG>sfio</STRONG>,
+the Safe/Fast I/O library<FONT SIZE=-6>[7]</FONT>,
+to perform all I/O operations.
+The <STRONG>sfio</STRONG> library, which is part of <STRONG>libast</STRONG>,
+provides a superset of the functionality provided by the standard
+I/O library defined in ANSI-C.
+If none of the additional functionality is required,
+and if you are not familiar with <STRONG>sfio</STRONG> and
+you do not want to spend the time learning it,
+then you can use <TT>sfio</TT> via the <TT>stdio</TT> library
+interface.  The development kit contains the header <TT>&lt;stdio.h&gt;</TT>
+which maps <TT>stdio</TT> calls to <TT>sfio</TT> calls.
+In most instances the mapping is done
+by macros or inline functions so that there is no overhead.
+The man page for the <TT>sfio</TT> library is in an Appendix.
+<P>
+However, there are some very nice extensions and
+performance improvements in <TT>sfio</TT>
+and if you plan any major extensions I recommend
+that you use it natively.
+<P>
+<H4><A name="Error Handling">Error Handling</A></H4>
+For error messages it is best to use the <TT>ast</TT> library
+function <TT>errormsg()</TT> rather that sending output to
+<TT>stderr</TT> or the equivalent <TT>sfstderr</TT> directly.
+Using <TT>errormsg()</TT> will make error message appear
+more uniform to the user.
+Furthermore, using <TT>errormsg()</TT> should make it easier
+to do error message translation for other locales
+in future versions of <TT>ksh</TT>.
+<P>
+The first argument to
+<TT>errormsg()</TT> specifies the dictionary in which the string
+will be searched for translation.
+The second argument to <TT>errormsg()</TT> contains that error type
+and value.  The third argument is a <EM>printf</EM> style format
+and the remaining arguments are arguments to be printed
+as part of the message.  A new-line is inserted at the
+end of each message and therefore, should not appear as
+part of the format string.
+The second argument should be one of the following:
+<DIV class=SH>
+<DL>
+<DT><TT>ERROR_exit(</TT><EM>n</EM><TT>)</TT>:<DD><BR>
+If <EM>n</EM> is not-zero, the builtin will exit value <EM>n</EM> after
+printing the message.
+<DT><TT>ERROR_system(</TT><EM>n</EM><TT>)</TT>:<DD><BR>
+Exit builtin with exit value <EM>n</EM> after printing the message.
+The message will display the message corresponding to <TT>errno</TT>
+enclosed within <TT>&#0091;&nbsp;&#0093;</TT> at the end of the message.
+<DT><TT>ERROR_usage(</TT><EM>n</EM><TT>)</TT>:<DD><BR>
+Will generate a usage message and exit.  If <EM>n</EM> is non-zero,
+the exit value will be 2.  Otherwise the exit value will be 0.
+<DT><TT>ERROR_debug(</TT><EM>n</EM><TT>)</TT>:<DD><BR>
+Will print a level <EM>n</EM> debugging message and will then continue.
+<DT><TT>ERROR_warn(</TT><EM>n</EM><TT>)</TT>:<DD><BR>
+Prints a warning message. <EM>n</EM> is ignored.
+</DL><P>
+<H4><A name="Option Parsing">Option Parsing</A></H4>
+The first thing that a built-in should do is to check
+the arguments for correctness and to print any usage
+messages on standard error.
+For consistency with the rest of <TT>ksh</TT>, it is best
+to use the <TT>libast</TT> functions <TT>optget()</TT> and
+<TT>optusage()</TT>for this
+purpose.
+The header <TT>&lt;error.h&gt;</TT> includes prototypes for
+these functions.
+The <TT>optget()</TT> function is similar to the
+System V C library function <TT>getopt()</TT>,
+but provides some additional capabilities.
+Built-ins that use <TT>optget()</TT> provide a more
+consistent user interface.
+<P>
+The <TT>optget()</TT> function is invoked as
+<DIV class=FI>
+<PRE>
+int optget(char *<EM>argv</EM>&#0091;&#0093;, const char *<EM>optstring</EM>)
+</DIV>
+</PRE>
+where <TT>argv</TT> is the argument list and <TT>optstring</TT>
+is a string that specifies the allowable arguments and
+additional information that is used to format <EM>usage</EM>
+messages.
+In fact a complete man page in <TT>troff</TT> or <TT>html</TT>
+can be generated by passing a usage string as described
+by the <TT>getopts</TT> command.
+Like <TT>getopt()</TT>,
+single letter options are represented by the letter itself,
+and options that take a string argument are followed by the <TT>:</TT>
+character.
+Option strings have the following special characters:
+<DIV class=SH>
+<DL>
+<DT><TT>:</TT><DD>
+Used after a letter option to indicate that the option
+takes an option argument.
+The variable <TT>opt_info.arg</TT> will point to this
+value after the given argument is encountered.
+<DT><TT>#</TT><DD>
+Used after a letter option to indicate that the option
+can only take a numerical value.
+The variable <TT>opt_info.num</TT> will contain this
+value after the given argument is encountered.
+<DT><TT>?</TT><DD>
+Used after a <TT>:</TT> or <TT>#</TT> (and after the optional <TT>?</TT>)
+to indicate the the
+preceding option argument is not required.
+<DT><TT>&#0091;</TT>...<TT>&#0093;</TT><DD><BR>
+After a <TT>:</TT> or <TT>#</TT>, the characters contained
+inside the brackets are used to identify the option
+argument when generating a <EM>usage</EM> message. 
+<DT><EM>space</EM><DD><BR>
+The remainder of the string will only be used when generating
+usage messages.
+</DL>
+</DIV>
+<P>
+The <TT>optget()</TT> function returns the matching option letter if
+one of the legal option is matched.
+Otherwise, <TT>optget()</TT> returns
+<DIV class=SH>
+<DL>
+<DT><TT>':'</TT><DD>
+If there is an error.  In this case the variable <TT>opt_info.arg</TT>
+contains the error string.
+<DT><TT>0</TT><DD>
+Indicates the end of options.
+The variable <TT>opt_info.index</TT> contains the number of arguments
+processed.
+<DT><TT>'?'</TT><DD>
+A usage message has been required.
+You normally call <TT>optusage()</TT> to generate and display
+the usage message.
+</DL>
+</DIV>
+<P>
+The following is an example of the option parsing portion
+of the <TT>wc</TT> utility.
+<DIV class=FI>
+<PRE>
+#include &lt;shell.h&gt;
+while(1) switch(n=optget(argv,"xf:&#0091;file&#0093;"))
+{
+	case 'f':
+		file = opt_info.arg;
+		break;
+	case ':':
+		error(ERROR_exit(0), opt_info.arg);
+		break;
+	case '?':
+		error(ERROR_usage(2), opt_info.arg);
+		break;
+}
+</DIV>
+</PRE>
+<P>
+<H4><A name="Storage Management">Storage Management</A></H4>
+It is important that any memory used by your built-in
+be returned.  Otherwise, if your built-in is called frequently,
+<TT>ksh</TT> will eventually run out of memory.
+You should avoid using <TT>malloc()</TT> for memory that must
+be freed before returning from you built-in, because by default,
+<TT>ksh</TT> will terminate you built-in in the event of an
+interrupt and the memory will not be freed.
+<P>
+The best way to allocate variable sized storage is
+through calls to the <STRONG>stak</STRONG> library
+which is included in <STRONG>libast</STRONG>
+and which is used extensively by <TT>ksh</TT> itself.
+Objects allocated with the <TT>stakalloc()</TT>
+function are freed when you function completes
+or aborts. 
+The <STRONG>stak</STRONG> library provides a convenient way to
+build variable length strings and other objects dynamically.
+The man page for the <STRONG>stak</STRONG> library is contained
+in the Appendix.
+<P>
+Before <TT>ksh</TT> calls each built-in command, it saves
+the current stack location and restores it after
+it returns.
+It is not necessary to save and restore the stack
+location in the <TT>b_</TT> entry function, 
+but you may want to write functions that use this stack
+are restore it when leaving the function.
+The following coding convention will do this in
+an efficient manner:
+<DIV class=FI>
+<PRE>
+<EM>yourfunction</EM>()
+{
+        char	*savebase;
+        int	saveoffset;
+        if(saveoffset=staktell())
+        	savebase = stakfreeze(0);
+        ...
+        if(saveoffset)
+        	stakset(savebase,saveoffset);
+        else
+        	stakseek(0);
+}
+</DIV>
+</PRE>
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="CALLING <TT>ksh</TT> SERVICES">CALLING <TT>ksh</TT> SERVICES</A></H3></FONT></FONT></CENTER>
+Some of the more interesting applications are those that extend
+the functionality of <TT>ksh</TT> in application specific directions.
+A prime example of this is the X-windows extension which adds
+builtins to create and delete widgets.
+The <STRONG>nval</STRONG> library is used to interface with the shell
+name space.
+The <STRONG>shell</STRONG> library is used to access other shell services.
+<P>
+<H4><A name="The nval library">The nval library</A></H4>
+A great deal of power is derived from the ability to use
+portions of the hierarchal variable namespace provided by <TT>ksh-93</TT>
+and turn these names into active objects.
+<P>
+The <STRONG>nval</STRONG> library is used to interface with shell
+variables.
+A man page for this file is provided in an Appendix.
+You need to include the header <TT>&lt;nval.h&gt;</TT>
+to access the functions defined in the <STRONG>nval</STRONG> library.
+All the functions provided by the <STRONG>nval</STRONG> library begin
+with the prefix <TT>nv_</TT>.
+Each shell variable is an object in an associative table
+that is referenced by name.
+The type <TT>Namval_t*</TT> is pointer to a shell variable. 
+To operate on a shell variable, you first get a handle
+to the variable with the <TT>nv_open()</TT> function
+and then supply the handle returned as the first
+argument of the function that provides an operation
+on the variable.
+You must call <TT>nv_close()</TT> when you are finished
+using this handle so that the space can be freed once
+the value is unset.
+The two most frequent operations are to get the value of
+the variable, and to assign value to the variable.
+The <TT>nv_getval()</TT> returns a pointer the the
+value of the variable.
+In some cases the pointer returned is to a region that
+will be overwritten by the next <TT>nv_getval()</TT> call
+so that if the value isn't used immediately, it should
+be copied.
+Many variables can also generate a numeric value.
+The <TT>nv_getnum()</TT> function returns a numeric
+value for the given variable pointer, calling the
+arithmetic evaluator if necessary.
+<P>
+The <TT>nv_putval()</TT> function is used to assign a new
+value to a given variable.
+The second argument to <TT>putval()</TT> is the value
+to be assigned
+and the third argument is a <EM>flag</EM> which
+is used in interpreting the second argument.
+<P>
+Each shell variable can have one or more attributes.
+The <TT>nv_isattr()</TT> is used to test for the existence
+of one or more attributes.
+See the appendix for a complete list of attributes.
+<P>
+By default, each shell variable passively stores the string you
+give with with <TT>nv_putval()</TT>, and returns the value
+with <TT>getval()</TT>.  However, it is possible to turn
+any node into an active entity by assigning functions
+to it that will be called whenever <TT>nv_putval()</TT>
+and/or <TT>nv_getval()</TT> is called.
+In fact there are up to five functions that can 
+associated with each variable to override the
+default actions.
+The type <TT>Namfun_t</TT> is used to define these functions.
+Only those that are non-<TT>NULL</TT> override the
+default actions.
+To override the default actions, you must allocate an
+instance of <TT>Namfun_t</TT>, and then assign
+the functions that you wish to override.
+The <TT>putval()</TT>
+function is called by the <TT>nv_putval()</TT> function.
+A <TT>NULL</TT> for the <EM>value</EM> argument
+indicates a request to unset the variable.
+The <EM>type</EM> argument might contain the <TT>NV_INTEGER</TT>
+bit so you should be prepared to do a conversion if
+necessary.
+The <TT>getval()</TT>
+function is called by <TT>nv_getval()</TT>
+value and must return a string.
+The <TT>getnum()</TT>
+function is called by by the arithmetic evaluator
+and must return double.
+If omitted, then it will call <TT>nv_getval()</TT> and
+convert the result to a number.
+<P>
+The functionality of a variable can further be increased
+by adding discipline functions that
+can be associated with the variable.
+A discipline function allows a script that uses your
+variable to define functions whose name is
+<EM>varname</EM><TT>.</TT><EM>discname</EM>
+where <EM>varname</EM> is the name of the variable, and <EM>discname</EM>
+is the name of the discipline.
+When the user defines such a function, the <TT>settrap()</TT>
+function will be called with the name of the discipline and
+a pointer to the parse tree corresponding to the discipline
+function.
+The application determines when these functions are actually
+executed.
+By default, <TT>ksh</TT> defines <TT>get</TT>,
+<TT>set</TT>, and <TT>unset</TT> as discipline functions.
+<P>
+In addition, it is possible to provide a data area that
+will be passed as an argument to
+each of these functions whenever any of these functions are called.
+To have private data, you need to define and allocate a structure
+that looks like
+<DIV class=FI>
+<PRE>
+struct <EM>yours</EM>
+{
+        Namfun_t	fun;
+	<EM>your_data_fields</EM>;
+};
+</DIV>
+</PRE>
+<P>
+<H4><A name="The shell library">The shell library</A></H4>
+There are several functions that are used by <TT>ksh</TT> itself
+that can also be called from built-in commands.
+The man page for these routines are in the Appendix.
+<P>
+The <TT>sh_addbuiltin()</TT> function can be used to add or delete
+builtin commands.  It takes the name of the built-in, the
+address of the function that implements the built-in, and
+a <TT>void*</TT> pointer that will be passed to this function
+as the third argument whenever it is invoked.
+If the function address is <TT>NULL</TT>, the specified built-in
+will be deleted.  However, special built-in functions cannot
+be deleted or modified.
+<P>
+The <TT>sh_fmtq()</TT> function takes a string and returns
+a string that is quoted as necessary so that it can
+be used as shell input.
+This function is used to implement the <TT>%q</TT> option
+of the shell built-in <TT>printf</TT> command.
+<P>
+The <TT>sh_parse()</TT> function returns a parse tree corresponding
+to a give file stream.  The tree can be executed by supplying
+it as the first argument to
+the <TT>sh_trap()</TT> function and giving a value of <TT>1</TT> as the
+second argument. 
+Alternatively, the <TT>sh_trap()</TT> function can parse and execute
+a string by passing the string as the first argument and giving <TT>0</TT>
+as the second argument.
+<P>
+The <TT>sh_isoption()</TT> function can be used to set to see whether one
+or more of the option settings is enabled.
+</DIV>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="References">References</A></H3></FONT></FONT></CENTER>
+<P>
+<DL compact>
+
+<DT>[1]<DD>
+<EM>POSIX &#45; Part 2: Shell and Utilities,</EM>
+IEEE Std 1003.2-1992, ISO/IEC 9945-2:1993.
+<DT>[2]<DD>
+Glenn Fowler,
+<EM>A Case for make</EM>,
+Software - Practice and Experience, Vol. 20 No. S1, pp. 30-46, June 1990.
+<DT>[3]<DD>
+Brian W. Kernighan and Dennis M. Ritchie,
+<EM>The C Programming Language</EM>,
+Prentice Hall, 1978.
+<DT>[4]<DD>
+American National Standard for Information Systems &#45; Programming
+Language &#45; C, ANSI X3.159-1989.
+<DT>[5]<DD>
+Bjarne Stroustroup,
+<EM>C++</EM>,
+Addison Wesley, xxxx
+<DT>[6]<DD>
+<EM>POSIX &#45; Part 1: System Application Program Interface,</EM>
+IEEE Std 1003.1-1990, ISO/IEC 9945-1:1990.
+<DT>[7]<DD>
+David Korn and Kiem-Phong Vo,
+<EM>SFIO - A Safe/Fast Input/Output library,</EM>
+Proceedings of the Summer Usenix,
+pp. , 1991.
+</DL>
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>March 13, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 55 - 0
cde/programs/dtksh/ksh93/docs/ksh/examples.html

@@ -0,0 +1,55 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<TITLE> www/ksh/examples.mm mm document </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ float:left; clear:both; }
+dd	{ margin-left:3em; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+
+
+<P>
+<P><CENTER><FONT color=red><FONT face=courier><H3><A name="Sample Functions">Sample Functions</A></H3></FONT></FONT></CENTER>
+<P></P><TABLE border=0 frame=void rules=none width=100%><TBODY><TR><TD>
+<TABLE align=center bgcolor=papayawhip border=0 bordercolor=white cellpadding=2 cellspacing=2 frame=void rules=none >
+<TBODY>
+<TR><TD align=left>
+<A href="functions/dirs.txt">dirs</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/getopt.txt">getopt</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/popd.txt">popd</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/title.txt">title</A></TD></TR>
+<TR><TD align=left>
+<A href="functions/emacs_keybind.txt">emacs_keybind</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/keybind.txt">keybind</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/pushd.txt">pushd</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="functions/vi_keybind.txt">vi_keybind</A></TD></TR>
+</TBODY></TABLE></TD></TR></TBODY></TABLE>
+
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="Sample Scripts">Sample Scripts</A></H3></FONT></FONT></CENTER>
+<P></P><TABLE border=0 frame=void rules=none width=100%><TBODY><TR><TD>
+<TABLE align=center bgcolor=papayawhip border=0 bordercolor=white cellpadding=2 cellspacing=2 frame=void rules=none >
+<TBODY>
+<TR><TD align=left>
+<A href="scripts/cgi-lib.ksh.txt">cgi-lib.ksh</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="scripts/env.txt">env</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="scripts/which.txt">which</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;&nbsp;</TD></TR>
+<TR><TD align=left>
+<A href="scripts/dump-cgi.ksh.txt">dump-cgi.ksh</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;<A href="scripts/line.txt">line</A>&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD><TD align=left>&nbsp;&nbsp;&nbsp;</TD></TR>
+</TBODY></TABLE></TD></TR></TBODY></TABLE>
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>March 13, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 1004 - 0
cde/programs/dtksh/ksh93/docs/ksh/faq.html

@@ -0,0 +1,1004 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<TITLE> general shell </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<SCRIPT type="text/javascript">
+var A, P, Q;
+function FAQ_mark(mark) {
+	P = null;
+	for (var i = 0; i < A.length; i++)
+		A[i].className = mark;
+}
+function FAQ_init() {
+	Q = document.getElementsByTagName("dt");
+	A = document.getElementsByTagName("dd");
+	FAQ_mark("hide");
+	for (var i = 0; i < Q.length; i++) {
+		 Q[i].onclick=function() {
+		 	var next = this.nextSibling;
+			while (next.nodeType != 1)
+				next = next.nextSibling;
+			if (P != null && P != next)
+				P.className = "hide";
+			if (next.className == "hide") {
+				next.className = "show";
+				P = next;
+			}
+			else {
+				next.className = "hide";
+				P = null;
+			}
+		}
+	 }
+}
+window.onload = FAQ_init;
+</SCRIPT>
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ margin: 15px 40px 5px; cursor: pointer; }
+dt:before {
+	content: "Q";
+	font-family: Georgia, "Times New Roman", Times, serif;
+	margin-right: 7px;
+	padding: 2px 6px 5px;
+	color: #FFD87D;
+	background-color: teal;
+	font-weight: normal;
+	margin-left: -35px;
+	position: relative;
+}
+dd	{ margin: 25px 70px 0px; }
+li	{ padding: 2px 0; }
+.show	{ display: block; }
+.hide	{ display: none; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+<P>
+<P><CENTER><FONT color=red><FONT face=courier><H3><A name="general">general</A></H3></FONT></FONT></CENTER>
+<DIV class=SH>
+<DL>
+
+<DT>What is KornShell?<DD>
+
+KornShell is a command and scripting language that is a superset of the System V UNIX shell,
+aka, BourneShell (or
+<EM>sh</EM>).
+
+<DT>What is ksh?<DD>
+
+ksh is the name of the program that implements the KornShell language.
+
+<DT>What is the history of ksh?<DD>
+
+ksh was written by David Korn at Bell Telephone Laboratories.
+David Korn is currently at AT&amp;T Research.
+The first version of ksh was in 1983.
+It was the first shell to have command line editing with both emacs and vi style interaction.
+The 1986 version was the first to offer multibyte support.
+The 1988 version of ksh is the version that was adopted by System V Release 4 UNIX
+and was a source document for the IEEE POSIX and ISO shell standards.
+The 1993 version is a major rewrite of the 1988 version and focuses more on scripting.
+
+<DT>Where is the official description of the KornShell language?<DD>
+
+The Bolsky and Korn book,
+<EM>The KornShell Command and Programming Language</EM>,
+published by Prentice Hall, defines the 1988 version.
+The newer Bolsky and Korn book,
+<EM>The New KornShell Command and Programming Language</EM>,
+also published by Prentice Hall, describes the 1993 version.
+There are many new features since this book was published and
+the man page for ksh93 is kept up to date.
+
+<DT>What are the major new features of KornShell 1993?<DD>
+
+The only major new interactive features are key binding and tab completion.
+Major new language features are floating point arithmetic,
+associative arrays, complete ANSI-C printf, name reference
+variables, new expansion operators, dynamic loading of
+built-in commands, active variables, and compound variables.
+Active and compound variables allow shell variables to
+behave like objects.  The ability to define types was added in 2009.
+In addition, ksh93 has been written to be
+extensible with an C language API for programming extensions.
+
+<DT>Are any further releases of ksh planned?<DD>
+
+Yes, the KornShell language and ksh implementation are in active development.
+Most of the focus will be on scripting and reusability.
+
+<DT>Why are newer release of ksh still called ksh93?<DD>
+
+We started the AST/ksh OpenSource release process in the late 90's.
+At that point ksh93 was the well-known name for ksh.
+The OpenSource release was finally granted in March 2000.
+No one has since volunteered to repeat that process for ksh<EM>XX</EM>.
+
+<DT>How can I determine the release or version of a particular ksh?<DD>
+
+The current version and release string may be accessed by
+<STRONG>${.sh.version}</STRONG>
+and
+<STRONG>$KSH_VERSION</STRONG>.
+The format is <STRONG>Version</STRONG> <EM>features</EM> 93<EM>version</EM>&#0091;-/+&#0093; <EM>release</EM>:
+<UL type=square>
+<LI>
+<EM>features</EM> --
+compile time features, typically enabled by <STRONG>SHOPT_</STRONG><EM>foo</EM> state variables in the
+ksh93 Makefile.
+A single letter represents each feature:
+<UL type=circle>
+<LI>
+<STRONG>A</STRONG>
+(<EM>SHOPT_AUDIT</EM>)
+<LI>
+<STRONG>B</STRONG>
+(<EM>SHOPT_BASH</EM>)
+bash compatibility mode.
+<LI>
+<STRONG>J</STRONG>
+(<EM>SHOPT_COSHELL</EM>)
+<STRONG>-lcoshell</STRONG> job pools.
+<LI>
+<STRONG>j</STRONG>
+(<EM>SHOPT_BGX</EM>)
+<LI>
+<STRONG>L</STRONG>
+(<EM>SHOPT_ACCT</EM>)
+<LI>
+<STRONG>M</STRONG>
+(<EM>SHOPT_MULTIBYTE</EM>)
+<LI>
+<STRONG>P</STRONG>
+(<EM>SHOPT_PFSH</EM>)
+<LI>
+<STRONG>R</STRONG>
+(<EM>SHOPT_REGRESS</EM>)
+</UL>
+<LI>
+<EM>version</EM>--
+a lower-case letter signifying major release points.
+An optional <STRONG>-</STRONG> following <EM>features</EM> signifies an alpha release.
+The first stable release has no <STRONG>-</STRONG>.
+An optional <STRONG>+</STRONG> signifies a stable release with bug patches and minor enhancements.
+<LI>
+<EM>release</EM>--
+the release date in <EM>YYYY-MM-DD</EM> form.
+This date corresponds to AST package and git repository releases.
+</UL>
+<STRONG>KSH_VERSION</STRONG>
+in a numeric context is an integer that encodes the release
+<EM>YYYYMMDD</EM>.
+
+<DT>What new features are planned for ksh?<DD>
+
+We are in the early stage of planning but the likely additions
+are namespaces, ability to read xml and json object into shell variables,
+and handling of queued signals.
+Support for multi-threading is also being considered.
+
+<DT>Is KornShell public domain?<DD>
+
+Yes, the language description is public domain and
+can be reimplemented.
+Some of the KornShell language features have been reimplemented
+in the GNU shell, bash, in zsh and mksh,  and in pdksh, a public domain
+implementation.
+
+<DT>Is ksh public domain?<DD>
+
+No, earlier versions were owned by both AT&amp;T and Novell.
+The 1993 version is owned by both Lucent and AT&amp;T.
+
+<DT>Is source code available?<DD>
+
+Starting in March 2000, the ksh93 source is available
+as part of a larger collection of software called
+the ast-open software package which can be downloaded
+from the
+<A href="https://github.com/att/ast" target=_top>github page.</A>
+
+<DT>What are the licensing terms?<DD>
+
+The exact license terms can be found on the 
+<A href="https://github.com/att/ast/blob/master/LICENSE.md" target=_top>licence page.</A>
+
+<DT>Does the license allow binaries to be freely redistributed?<DD>
+
+Yes, provided you make the license terms available to
+everyone you distribute binaries to.
+
+<DT>If I make changes to the code, do I have to make them public?<DD>
+
+No, you do not have to make them public.
+However, if you distribute the changes, you must allow us to be able
+to get these changes and distribute them along with the source.
+
+<DT>Why do some vendors still ship ksh88, not ksh93?<DD>
+
+Since ksh88 was included in System V release 4, most vendors
+have just included this version.  However most Linux systems
+and Mac OS provide ksh93 version 's' or later.  Solaris11 uses
+ksh93 as /bin/sh.
+
+<DT>Do you provide support for ksh?<DD>
+
+No, we will try to fix any bugs we hear about in future
+releases, but we do not provide any official support.
+
+<DT>Is ksh supported commercially?<DD>
+
+Software vendors that supply ksh with
+their systems typically support it for that system.
+
+<DT>What is pdksh and is it related to ksh or KornShell?<DD>
+
+pdksh is a public domain version of a UNIX shell that is
+unrelated to ksh.
+It supports most of the 1988 KornShell language features and some of the 1993 features.
+Some KornShell scripts will not run with pdksh.
+
+<DT>How is the MKS Toolkit KornShell related to KornShell?<DD>
+
+MKS Toolkit KornShell is a completely independent implementation
+that supports a subset of the 1988 KornShell language.
+
+<DT>What systems does ksh run on?<DD>
+
+ksh has been written to be portable.
+It has been ported to virtually run on every known UNIX system.
+In addition it runs on non-UNIX systems such as IBM's MVS using OpenEdition, and
+Microsoft's Windows 9X, Windows NT and Windows 2000.
+ksh is part of the UWIN (Unix for Windows)</A>
+software,
+
+<DT>Does ksh conform to the IEEE POSIX and ISO shell standard?<DD>
+
+The 1993 version should conform to the 1992 standard.
+At one point it had passed the test suite created by X/OPEN.
+
+<DT>Will KornShell 88 scripts run with KornShell 93?<DD>
+
+In almost all cases, the answer is yes.
+However, the IEEE POSIX and ISO standards required a few
+changes that could cause scripts to fail.
+There is a separate document that lists all known incompatibilities.
+
+<DT>Can ksh run as /bin/sh?<DD>
+
+We have installed ksh as /bin/sh on several systems without
+encountering any problems.  It is /bin/sh on Solaris11.
+Our Linux systems use this instead of bash.
+
+</DL>
+</DIV>
+
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="interactive">interactive</A></H3></FONT></FONT></CENTER>
+<DIV class=SH>
+<DL>
+
+<DT>How do I get separate history files for shell?<DD>
+
+ksh uses a shared history file for all shells that
+use the same history file name.
+This means that commands entered in one window will be seen by
+shells in other windows.
+To get separate windows, the HISTFILE variable needs to be set to different name
+before the first history command is created.
+
+<DT>How do I get the time of day in my prompt?<DD>
+
+You can use printf with supports the %T format for time and date formatting.
+For example, the format %(%H:%M:%S)T specifies time in hour, minute, second
+format and if no argument is specified, the current time is used.  Thus setting
+PS1='$(printf "%(%H:%M:%S)T" $' will output the time of day before the
+$ prompt.
+
+<DT>Why does the screen width not function correctly when non-printing characters are in my prompt?<DD>
+
+The shell computes the screen width by subtracting the width of the prompt from the screen width.
+To account for non-printing characters, for example escape sequences that display in the title
+bar, follow these characters with a carriage return.
+The shell starts recomputing the width after each carriage return.	
+
+<DT>What is the PS4 prompt and how is it used?<DD>
+
+The PS4 prompt is evaluated and displayed before each line when
+running an execution trace.
+If unset, a + and a &lt;space&gt; will
+be output before each line in the trace.
+Putting '$LINENO' inside PS4 will cause the line number to be displayed.
+Putting '$SECONDS' in the PS4 prompt will cause the elapsed time
+to be displayed before each line.
+Note that single quotes are used to prevent the expansion from happening
+when PS4 is defined.
+
+<DT>How is keybinding done?<DD>
+
+ksh93 provides a KEYBD trap that gets executed whenever a key
+is entered from the keyboard.
+Using this trap, and the associative
+array feature of ksh93, a keybind function can easily be written
+which will map any entered key sequence to another key sequence.
+
+<DT>How do I get the arrow keys to work?<DD>
+
+Starting with the 'h' point release, on most keyboards you
+do not have to do anything to get the arrow keys to work.
+However, if they do not generate standard escape sequences,
+then you will have to use a keybinding function to get them
+to work.
+
+<DT>Does ksh support file name completion?<DD>
+
+Yes, it does.
+The default key binding is &lt;ESC&gt;&lt;ESC&gt;
+however, starting with the 'g' point release, &lt;TAB&gt; also works
+for completion.
+
+<DT>Does ksh support command completion?<DD>
+
+If you perform completion on the first word of a command,
+ksh will do completion using aliases, functions, and commands.
+
+<DT>Is completion programmable?<DD>
+
+Yes, using the key binding mechanism, you can script the behavior
+of any key and therefore cause the current contents of any
+line to be replaced by any other line.
+
+<DT>Is there any way to get the command-line editor to go to more than a single line?<DD>
+
+The multiline option (now on by default) allows lines longer than the width
+of the screen to be displayed on multiple lines on the screen.
+Also in vi-mode, if you hit 'v' while in control mode, it will bring
+up a full screen version of vi on the current command.
+The command
+will execute when you exit vi.
+
+<DT>What is predictive editing?<DD>
+In 2010, a compile option was added that cause the shell to try to predict
+what you were trying to type by looking in the history file for all lines
+that matched and presenting them as a menu.  Any line starting with # would
+use the characters you type to find matching lines from the history file.
+If you find the line you wanted, you can enter the number followed by
+&lt;TAB&gt; or newline.  However bugs in earlier version led to core dumps.
+
+
+<DT>Can I use the shell line editor on other commands?<DD>
+
+The command ie, that comes along with shell, can be used
+to run line input oriented commands with command line editing.
+
+<DT>When I do echo $?, I am getting 267. What does this mean?<DD>
+
+ksh93 reports process that terminate with a signal as 256+signo.
+Earlier versions used 128+signo but this makes it impossible
+to distinguish from a command exit with that value.
+If you run
+<DIV class=FI>
+<PRE>
+kill -l $?
+</DIV>
+</PRE>
+on this signal number, it will give the the name of the signal
+that caused this exit.
+
+<DT>When I type builtin, I notice that some of these are full pathnames. What does this mean?<DD>
+
+Builtins that are not bound to pathnames are always searched
+for before doing a path search.
+Builtins that are bound
+to pathnames are only executed when the path search would
+bind to this pathname.
+
+<DT>What is a self generating man page?<DD>
+
+A self generating man page is one that is generated by the
+option parser within that command using an extended version
+of the getopts function.
+The man page can be generated in html,
+troff, or directly for the terminal.
+Most builtin commands
+in the shell have self generating man pages so that you
+can run for example,
+<STRONG>kill &#45;&#45;man</STRONG>
+or
+<STRONG>kill &#45;&#45;html</STRONG>
+to get
+the description of kill to the screen or as an html file.
+All self-documenting output is to the standard error,
+so you must redirect 2&gt;... to capture the output.
+<P>
+This same method can also be used for shell scripts.
+Run
+<STRONG>getopts --man</STRONG>
+for more details.
+
+<DT>What is autoloading?<DD>
+
+Autoloading was a method used in ksh88, and still permitted in ksh93
+to declare that a name corresponded to a function.
+The function
+would be loaded and executed when first referenced.
+This was
+necessary since FPATH was always searched after PATH with ksh88
+and therefore if you defined a function whose name was the same
+as that of a program on your path, the program on your path
+would have been executed.
+With ksh93, when a pathname is
+encountered that is on PATH, but also is in FPATH, this directory
+is assumed to be a function directory.
+Thus, you can have
+function directories searched before program directories so
+that autoloading is no longer needed.
+
+<DT>Why does the output from 'time command 2&gt; file' come out on the screen?<DD>
+
+The time command is a compound command in ksh and time is a reserved
+word It can be followed by any pipeline.  Thus, redirections applied
+at the end are for the command, not to time itself.  You can use
+time {...;} 2&gt; file to capture the timing output to a file.  Note,
+that with ksh, time works with all commands, for example,
+time for i; do xxx;done.
+
+<DT>When I run 'mv * ../elsewhere' I so that get '-ksh: mv: cannot execute &#0091;Arg list too long&#0093;', what causes this?<DD>
+
+UNIX systems have a limit to the space consumed by command arguments and
+environment variables when running commands that are not built into
+the shell.  The configuration parameter ARG_MAX defines this limit.
+You can run 'getconf ARG_MAX' to find the limit for your system.  Note
+that the shell expands * to the list of files in the current directory
+before running mv.  In many case the xargs or tw command can be
+used to work around this problem by splitting the line into chunks
+and invoking the command.  Another way to work around this limit
+is to make the command a builtin.  On systems in which the cmd
+library is installed, you can invoke 'builtin &#45;f cmd mv' to make
+mv a shell builtin in which case the line length limit no longer
+applies.  Another alternative is to use a for loop and invoke
+the mv command for each file, for exampe,
+'for i in *;do mv $i ../elsewhere;done'.
+Starting with ksh93o+, a new feature was added to ksh to overcome
+this limit in some cases.  If a command is preceded by
+'command &#45;x', and it fails because there are two many arguments,
+the command will be run multiple times with subsets of the arguments.
+However, the change in ksh93o+ does not work in the above case
+because the ../elsewhere is not used for each subset.  This problem
+was resolved starting in ksh93p so that
+command &#45;x mv * ../elsewhere
+should work.  Note that it is possible to do alias mv='command &#45;x mv'
+
+<DT>Is there any way to generate the list of .c files in the current directory and all the subdirectories?<DD>
+
+Starting with ksh93o+, the globstar option (set &#45;G or set &#45;o globstar)
+was added.  With globstar enabled, ** by itself matches zero or more
+directories or files, and **/ matches zero or more directories so that
+**/*.c will match all .c files under the current directory.
+
+<DT>Is there any way to prevent sending a HUP signal to a job when I log out if I didn't nohup the job?<DD>
+
+Yes, the disown command tells ksh not to forward the HUP signal
+to the specified jobs when it disconnects.
+
+</DL>
+</DIV>
+
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="programming">programming</A></H3></FONT></FONT></CENTER>
+<DIV class=SH>
+<DL>
+
+<DT>What is the difference between * and @, for example, and ?<DD>
+
+When used outside of "", they are equivalent.
+However, within
+double quotes, "$@" produces one argument for each positional
+parameter, and "$* produces a single argument.
+Note that "$@"
+preserves arguments lists, whereas $* may not unless both
+word splitting and pathname expansion are disabled.
+
+<DT>Why do I need spaces around { and } but not around ( and )?<DD>
+
+The characters ( and ) are shell metacharacters and are always
+treated specially.
+For historical reasons, { and } were
+treated as reserved words and are only special as separate
+words at locations in which a command can begin.
+
+<DT>How do I get read to maintain the &#0092; characters?<DD>
+
+Use read -r instead.
+
+<DT>How can I a write a ksh script that responds directly to each character so that you user just has to enter y, not y&lt;return&gt;?<DD>
+
+There are two ways to do this.
+The easiest is to use
+<DIV class=FI>
+<PRE>
+read -n1 x
+</DIV>
+</PRE>
+Alternatively, you could do
+<DIV class=FI>
+<PRE>
+function keytrap
+{
+	.sh.edchar=${sh.edchar}$'
+}
+trap keytrap KEYBD
+</DIV>
+</PRE>
+and then
+<DIV class=FI>
+<PRE>
+read x
+</DIV>
+</PRE>
+
+<DT>What is the purpose of $'...'?<DD>
+
+The $'...' string literal syntax was added to ksh93 to solve the problem
+of entering special characters in scripts.
+It uses
+ANSI-C rules to translate the string between the '...'.
+It would have been cleaner to have all "..." strings handle
+ANSI-C escapes, but that would not be backward compatible.
+
+<DT>What is the -n option used for?<DD>
+
+You should always run ksh -n on each script you write.
+The -n
+option will check for syntax errors on paths that might not
+even be checked when you run the script.
+It also produces
+a number of warning messages.
+
+<DT>Why are both `...` and $(...) used for command substitution?<DD>
+
+The `...` method has some rather strange quoting rules
+and does not nest easily.
+$(...) was added to ksh88 to
+make command substitution easy to use.
+`...` is provided
+for backwards compatibility only.
+
+<DT>How can I tell if all the commands of a pipeline have succeeded?<DD>
+
+The pipefail option was added to the 'g' point release of ksh93.
+With pipefail set, a pipeline will fail if any element of the
+pipeline fails.
+The exit status will be that of the first
+command that has failed.
+
+<DT>What is the difference between &#0091;...&#0093; and &#0091;&#0091;...&#0093;&#0093;?<DD>
+
+The &#0091;&#0091;...&#0093;&#0093; is processed as part of the shell grammar
+whereas &#0091;...&#0093; is processed like any other command.
+Operators and operands are detected when the command is
+read, not after expansions are performed.
+The shell does not
+do word splitting or pathname generation inside  &#0091;&#0091;...&#0093;&#0093;.
+This allows patterns to be specified for string matching
+purposes.  You should use &#0091;&#0091;...&#0093;&#0093; instead of &#0091;...&#0093; and test.
+
+<DT>How come &#0091;&#0091; $foo == $bar &#0093;&#0093; is true and &#0091;&#0091; $bar == $foo &#0093;&#0093; is false?<DD>
+
+The == operator is not symmetrical.
+It takes a string on the left
+and a pattern on the right.
+However, if you double quote the right
+hand side, which removes the special meaning of pattern match
+characters, then this becomes a string comparison so that
+&#0091;&#0091; "$foo" == "bar" &#0093;&#0093; and &#0091;&#0091; "$bar" == "$foo" &#0093;&#0093; are equivalent.
+
+<DT>Why does ksh93 have print since echo already exists is is widely used?<DD>
+
+The behavior of echo varies from system to system.
+The POSIX standard does not define the behavior of echo when
+the first argument beings with a - or when any argument
+contains a &nbsp;character.
+This makes echo pretty useless for
+use in portable scripts.
+
+<DT>What is $bar after running 'echo foo | read bar'?<DD>
+
+The answer is foo.
+ksh runs the last component of a pipeline
+in the current process.
+Some shells run it as a subshell
+as if you had invoked it as  echo foo | (read bar).
+
+<DT>How can I access a substring of a variable?<DD>
+
+The syntax ${varname:offset:len} can be used to generate
+the string of length len starting at the the specified
+offset.   String offsets start at 0.  If :len is omitted,
+then the remainder of the string will be used.  Both offset
+and len can be arithmetic expressions.  A negative offset is
+subtracted from the last offset.
+
+<DT>What is the difference between ((expr)) and $((expr))?<DD>
+
+((expr)) is a command that evaluates an arithmetic expression.
+The exit status of this command is 0 if the expression
+evaluates to non-zero and is 1 if it evaluates to 0.
+0 is an string expansion that expands to a string
+representation of the value of this arithmetic expression.
+It can be used anywhere a variable substitution is permitted.
+<P>
+
+<DT>What is the difference between $((x*y)) and $(($x*$y))?<DD>
+
+In the first case the value of x and the value of y are multiplied
+together, and then their result is converted to a string.
+In the
+second case variables $x, *, and $y are concatenated to form
+an arithmetic expression which is then evaluated.
+This can
+yield different results, for example,
+<DIV class=FI>
+<PRE>
+x=2+3 y=4+5
+print $((x*y)) \$(($x*$y))
+45 19
+When x and y are numeric the first form is recommended for better
+performance.
+</DIV>
+</PRE>
+
+<DT>How do I handle filenames with spaces in them?<DD>
+
+To be POSIX conforming, ksh has to do word splitting and
+pathname expansion the results of substitutions.
+You can
+enclose variable substitutions in "..." to prevent both
+word splitting and pathname expansion.
+Alternatively,
+you can disable word splitting by setting IFS='' and
+pathname generation with set -o noglob.
+
+<DT>What are active variables?<DD>
+
+By default shell variables are passive.
+They hold values
+given to them on assignment, and return values on reference.
+Active variables allow the assignment and reference (and
+other actions) be controlled by functions specific to that
+variable.
+At the shell level, a 'get', 'set', or 'unset'
+shell function can be defined for any variable to make them
+active, so that the function  foo.set will be invoked whenever
+the variable foo is assigned a value.
+At the C interface
+level, several functions can be stacked together for an
+active variable.
+
+<DT>What is the difference between function name and name()?<DD>
+
+In ksh88 these were the same.
+However, the POSIX standard
+choose foo() for functions and defined System V Release 2
+semantics to them so that there are no local variables
+and so that traps are not scoped.
+ksh93 keeps the ksh88
+semantics for functions defined as function name, and
+has changed the name() semantics to match the POSIX
+semantics.
+Clearly,
+<STRONG>function</STRONG>
+<EM>name</EM>
+is more useful.
+
+<DT>What is the naming conventions for files in FPATH and can one file contain more than one function definition?<DD>
+
+You can have more than one function defined in each file defined
+in FPATH and all of them will be added to the list of known
+functions.  Any commands placed in this file outside of function
+definitions will be invoked first.  The name of the file must be
+that of the first function you invoke.  If you have several functions
+defined in one file, then you should create a link to each of the
+function names that can potentially be invoked first.
+
+<DT>What are name reference variables and how are they used?<DD>
+
+Reference variables are variables in which all references
+and assignments refer to the variable that they reference.
+For example,
+<DIV class=FI>
+<PRE>
+typeset -n name=$1
+name=value
+</DIV>
+</PRE>
+is equivalent to
+<DIV class=FI>
+<PRE>
+eval \$1='value'
+</DIV>
+</PRE>
+References are most useful for passing arguments such as
+arrays to functions.
+
+<DT>If i=1 and var1=some value, how do I print var$i to get its value?<DD>
+
+Either use
+<DIV class=FI>
+<PRE>
+eval print var\$i
+</DIV>
+</PRE>
+or
+<DIV class=FI>
+<PRE>
+typeset -n x=var$i
+print $x
+</DIV>
+</PRE>
+
+<DT>How can I shift the elements of an array?<DD>
+
+The shift special builtin-command only works for positional
+parameters.
+However, noting that array subscripts start at 0, you can use
+<DIV class=FI>
+<PRE>
+typeset -A name "${name&#0091;@&#0093;:1}"
+</DIV>
+</PRE>
+to shift the array.
+
+<DT>Why are the braces required with array references, e.g. ${x&#0091;1&#0093;}?<DD>
+
+It would be nice to do $x&#0091;1&#0093;, but the POSIX shell would expand $x
+and then search for the file pattern resulting by concatenating &#0091;1&#0093;.
+ksh is POSIX compatible.
+
+<DT>How do I get the list of subscript names for an associative array?<DD>
+
+The prefix operator ! in variable expansions can be used to get names.
+To get the names of subscripts for an array, associative
+or indexed, use ${!var&#0091;@&#0093;}.
+
+<DT>How do I do global substitutions on the contents of shell variables?<DD>
+
+Use // instead of / for global substitution, ${var//aa/bb} will
+expand to the value of  with each "aa" replace by "bb".
+
+<DT>How can I convert %XX values to ascii?<DD>
+
+You can convert this to a sequence of ANSI C strings and then eval that
+string, for example suppose the variable 'foo' contains %XX strings, then	
+<DIV class=FI>
+<PRE>
+eval print -r -- "\$'${foo//'%'@(??)/'\x\1"'\$'"}'"
+</DIV>
+</PRE>
+will print out the string in ascii.
+
+<DT>I want to use exec to open a file. How do I prevent the script from exiting if the exec fails?<DD>
+
+If you run
+<DIV class=FI>
+<PRE>
+command exec ... || error ...
+</DIV>
+</PRE>
+then  error will be executed if the exec fails, but the script
+will not terminate.
+The command builtin will prevent the shell
+from exiting when special built-ins fail.
+
+<DT>How do I execute a builtin inside a function of the same name?<DD>
+
+You use the command builtin for this.
+For example,
+<DIV class=FI>
+<PRE>
+function cd
+{
+	command cd "$@" &amp;&amp; title "$PWD"
+}
+</DIV>
+</PRE>
+will run the builtin command cd from within the function cd
+rather than calling the function cd recursively.
+
+<DT>How are variables scoped in ksh?<DD>
+
+The scoping of variables was not defined for ksh88 but in ksh93
+static scoping was specified.
+For example the output from
+<DIV class=FI>
+<PRE>
+function f1
+{
+	print foo=$foo
+}
+function f2
+{
+	typeset foo=local
+	f1
+}
+foo=global
+f2
+</DIV>
+</PRE>
+will be "global".
+To get f2 to cause f1 to print the local
+value of foo, f2 can run "foo=$foo f1" instead.
+
+<DT>Can you write a self reproducing program in KornShell?<DD>
+
+Yes, the following program is self reproducing.
+Any shorter ones?
+<DIV class=FI>
+<PRE>
+n="
+" q="'" x="cat &lt;&lt;-!" y=! z='n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y'
+cat &lt;&lt;-!
+n="$n" q="$q" x="$x" y=$y z=$q$z$q$n$x$n$z$n$y
+!
+</DIV>
+</PRE>
+
+</DL>
+</DIV>
+
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="redirections">redirections</A></H3></FONT></FONT></CENTER>
+<DIV class=SH>
+<DL>
+
+<DT>How do I redirect both standard input and standard output to a file?<DD>
+
+Add the following redirections to the command.
+&gt; file 2&gt; &amp;1.
+This will redirect standard output (file descriptor 1) to "file" and
+standard error (file descriptor 2) to the same place as file descriptor 1.
+ksh redirection allows you to redirect any single digit file descriptor
+by putting the descriptor number in front of the redirection operator
+with no intervening space.
+
+<DT>Is there a way for the shell to pick the file number when I open a file?<DD>
+
+Yes, a redirection operator operator can be preceded by {n} without any
+intervening space where n is the name of a variable.  The file descriptor
+will be placed in variable n.
+
+<DT>How do I connect to a socket from a shell script?<DD>
+
+exec 3&lt;&gt; /dev/tcp/hostname/portnum 
+will open a tcp connection to portnum on hostname for
+reading and writing on file descriptor 3.
+You can then
+use read and print statements with file descriptor 3,
+or redirection operators &lt;&amp;3 or &gt;&amp;3 to use these connections.
+
+<DT>How do I seek to a given location in a file?<DD>
+
+The redirection operators &lt;# and &gt;# allow you to seek to a specified
+location in a file.  The operator can be followed by an arithmetic
+expression contained in ((...)).  The variables CUR and EOF can be used
+in the arithmetic expression to get relative locations or locations
+relative to the end of file respectively.
+Alternatively, &lt;# and &gt;# can be followed by a shell pattern.  In this
+case, the file will be positioned to beginning of the next line
+containing this pattern.
+
+<DT>What is the the &lt;&lt;&lt; redirection operator?<DD>
+
+It denotes a here-document in which the document is contained the
+argument that follows &lt;&lt;&lt; and therefore there is no delimiter.
+
+<DT>What is the the &gt;; redirection operator?<DD>
+
+This operator writes the output into a temporary file in the same
+directory as the file specified after &gt;;.  If the command completes
+successfully, then the the file is replaced.  Otherwise, the
+original file is unchanged and the temporary file removed.
+
+<DT>What is the the &lt;&gt;; redirection operator?<DD>
+
+The file is opened for reading and writing as with  &lt;&gt;.  However,
+when the file is closed it is truncated to the its current location.
+
+</DL>
+</DIV>
+
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="extensions">extensions</A></H3></FONT></FONT></CENTER>
+<DIV class=SH>
+<DL>
+
+<DT>Is there a shell compiler?<DD>
+
+There is a separate command named shcomp that will convert
+a script into an intermediate machine independent form.
+The shell will detect this format whenever it runs a script and execute
+directly from this intermediate format.
+
+<DT>What is the advantage of making commands built-in?<DD>
+
+The startup time is reduced by a couple of orders of magnitude.
+In addition, built-in commands can access ksh internals.
+
+<DT>What is the disadvantage of making commands built-in?<DD>
+
+Errors in these built-ins can cause the shell to crash.
+
+<DT>How do I add built-in commands?<DD>
+
+There are two ways to do this.
+One is write a shared library
+with functions whose names are b_xxxx where xxxx is the name of
+the builtin.
+The function b_xxxx takes three arguments.
+The first
+two are the same as a mail program.
+The third parameter is
+a pointer argument which will point to the current shell context.
+The second way is to write a shared library with a function named
+lib_init().
+This function will be called with an argument of 0
+after the library is loaded.
+This function can add built-ins
+with the sh_addbuiltin() API function.
+In both cases, the
+library is loaded into the shell with the "builtin" utility.
+
+<DT>Can ksh93 be embedded?<DD>
+
+Yes, ksh93 can be compiled as a shared or dynamically linked
+library which can be embedded into applications.
+There is
+an API for interfacing to shell variables and to several of
+the internal shell functions.
+
+<DT>Can I write GUI applications with ksh?<DD>
+
+There are two extensions to ksh that can be used to write
+GUI applications as shell script.
+One is dtksh which
+was written by Steve Pendergrast at Novell and is
+included with the Common Desktop Environment, CDE.
+The other is
+tksh which was written by Jeff Korn.
+tksh combines the tk graphics
+package with ksh93 and reimplements the tcl language
+as an extension so that both tcl and ksh scripts
+can run in the same address space.
+The source for tksh
+is included in the ast-open package.
+
+</DL>
+</DIV>
+<TABLE cellpadding=4>
+<TR>
+<TD bgcolor=teal><A href='#' onclick='FAQ_mark("show")'><FONT color="#FFD87D">show all answers</FONT></A></TD>
+<TD bgcolor=teal><A href='#' onclick='FAQ_mark("hide")'><FONT color="#FFD87D">hide all answers</FONT></A></TD>
+</TR>
+</TABLE>
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>June 19, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 207 - 0
cde/programs/dtksh/ksh93/docs/ksh/features.html

@@ -0,0 +1,207 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<TITLE> www/ksh/features.mm mm document </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ float:left; clear:both; }
+dd	{ margin-left:3em; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+
+
+<P>
+<P><CENTER><FONT color=red><FONT face=courier><H3><A name="ksh features">ksh features</A></H3></FONT></FONT></CENTER>
+KSH-93 is the most recent version of the KornShell Language described in
+<EM>The KornShell Command and Programming Language</EM>,
+by Morris Bolsky and David Korn of AT&amp;T Research (nee Bell Laboratories).
+The KornShell is a shell programming language,
+which is upward compatible with
+<EM>sh</EM>
+(the Bourne Shell),
+and is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and
+Utilities standard.
+KSH-93 provides an enhanced programming environment in
+addition to the major command-entry features of the BSD
+shell
+<EM>csh</EM>.
+With KSH-93, medium-sized programming tasks can be
+performed at shell-level without a significant loss in performance.
+In addition,
+<EM>sh</EM>
+scripts can be run on KSH-93 without modification.
+<P>
+The code should conform to the IEEE POSIX 1003.1 standard and to the
+proposed ANSI-C standard so that it should be portable to all
+such systems.
+Like the previous version, KSH-88,
+it is designed to accept eight bit character sets
+transparently, thereby making it internationally compatible.
+It can support multi-byte characters sets with some characteristics
+of the character set given at run time.
+<P>
+KSH-93 provides the following features, many of which were also inherent
+in KSH-88:
+
+<P>
+<H4><A name="Enhanced Command Re-entry Capability">Enhanced Command Re-entry Capability</A></H4>
+The KSH-93 history
+function records commands entered at any shell level and stores
+them, up to a user-specified limit, even after you log off.
+This allows you to re-enter long commands with a few keystrokes
+- even those commands you entered yesterday.
+The history file allows for eight bit characters in
+commands and supports essentially unlimited size histories.
+
+<P>
+<H4><A name="In-line Editing">In-line Editing</A></H4>
+In
+<EM>sh</EM>
+the only way to fix mistyped
+commands is to backspace or retype the line.
+KSH-93 allows you
+to edit a command line using a choice of EMACS-TC or
+<EM>vi</EM>
+functions.
+You can use the in-line editors to complete filenames as
+you type them.
+You may also use this editing feature when entering
+command lines from your history file.
+A user can capture keystrokes and rebind keys to customize the
+editing interface.
+
+<P>
+<H4><A name="Extended I/O Capabilities">Extended I/O Capabilities</A></H4>
+KSH-93 provides several I/O
+capabilities not available in
+<EM>sh</EM>,
+including the ability to:
+<UL type=square>
+<LI>
+specify a file descriptor for input and output
+<LI>
+start up and run co-processes
+<LI>
+produce a prompt at the terminal before a read
+<LI>
+easily format and interpret responses to a menu
+<LI>
+echo lines exactly as output without escape processing
+<LI>
+format output using printf formats.
+<LI>
+read and echo lines ending in "&#0092;e".
+</UL>
+
+<P>
+<H4><A name="Improved performance">Improved performance</A></H4>
+KSH-93 executes many scripts faster
+than the System V Bourne shell.
+A major reason for this is
+that many of the standard utilities are built-in.
+To reduce the time to initiate a command, KSH-93 allows
+commands to be added as built-ins at run time
+on systems that support dynamic loading such as System V Release 4.
+
+<P>
+<H4><A name="Arithmetic">Arithmetic</A></H4>
+KSH-93 allows you to do integer arithmetic in any
+base from two to sixty-four.
+You can also do double
+precision floating point arithmetic.
+Almost the complete set of C language operators are available
+with the same syntax and precedence.
+Arithmetic expressions can be used to as an argument expansion 
+or as a separate command.
+In addition there is an arithmetic for command that works
+like the for statement in C.
+
+<P>
+<H4><A name="Arrays">Arrays</A></H4>
+KSH-93 supports both indexed and associative arrays.
+The subscript for an indexed array is an arithmetic expression,
+whereas, the subscript for an associative array is a string.
+
+<P>
+<H4><A name="Functions and Aliases">Functions and Aliases</A></H4>
+Two mechanisms - functions and
+aliases - can be used to assign a user-selected identifier to
+an existing command or shell script.
+Functions allow local variables and provide scoping
+for exception handling.
+Functions can be searched for and loaded on first reference the
+way scripts are.
+
+<P>
+<H4><A name="Substring Capabilities">Substring Capabilities</A></H4>
+KSH-93 allows you to create a
+substring of any given string either by specifying the starting
+offset and length, or by stripping off leading
+or trailing substrings during parameter substitution.
+You can also specify attributes, such as upper and lower case,
+field width, and justification to shell variables.
+
+<P>
+<H4><A name="Enhanced pattern matching capabilities">Enhanced pattern matching capabilities</A></H4>
+KSH-93 allows you to specify
+regular expressions for file and string matches.
+
+<P>
+<H4><A name="Improved debugging">Improved debugging</A></H4>
+KSH-93 can generate line numbers on execution traces.
+Also, I/O redirections are now traced.
+There is a DEBUG trap that gets evaluated after each command
+so that errors can be localized.
+
+<P>
+<H4><A name="Job Control">Job Control</A></H4>
+On systems that support job control, including
+System V Release 4, KSH-93
+provides a job-control mechanism almost identical to that of
+the BSD "csh", version 4.1.
+This feature allows you
+to stop and restart programs, and to move programs between the
+foreground and the background.
+
+<P>
+<H4><A name="Added security">Added security</A></H4>
+KSH-93 can execute scripts which do not have read permission
+and scripts which have the setuid and/or setgid set when
+invoked by name, rather than as an argument to the shell.
+It is possible to log or control the execution of setuid and/or
+setgid scripts.
+The noclobber option prevents you from accidentally erasing
+a file by redirecting to an existing file.
+
+<P>
+<H4><A name="Documentation">Documentation</A></H4>
+Documentation for KSH-93 consists of an
+<EM>Introduction to KSH-93,</EM>
+<EM>Compatibility with the Bourne Shell</EM>,
+a manual page and a
+README file.
+In addition, the
+<EM>New KornShell Command and Programming Language</EM>
+book is available from Prentice Hall.
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>March 13, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 111 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/dirs.txt

@@ -0,0 +1,111 @@
+#
+# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS
+#
+# Uses global parameters _push_max _push_top _push_stack
+integer _push_max=100 _push_top=100
+# Display directory stack -- $HOME displayed as ~
+function dirs
+{
+    typeset dir="${PWD#$HOME/}"
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    print -r - "$dir ${_push_stack[@]}"
+}
+
+# Change directory and put directory on front of stack
+function pushd
+{
+    typeset dir= type=0
+    integer i
+    case $1 in
+    "") # pushd
+        if    ((_push_top >= _push_max))
+        then  print pushd: No other directory.
+              return 1
+        fi
+        type=1 dir=${_push_stack[_push_top]}
+        ;;
+    +[1-9]|+[1-9][0-9]) # pushd +n
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        type=2 dir=${_push_stack[i]}
+        ;;
+    *)  if    ((_push_top <= 0))
+        then  print pushd: Directory stack overflow.
+              return 1
+        fi
+    esac
+    case $dir in
+    \~*)   dir=$HOME${dir#\~}
+    esac
+    cd "${dir:-$1}" > /dev/null || return 1
+    dir=${OLDPWD#$HOME/}
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    case $type in
+    0)  # pushd name
+        _push_stack[_push_top=_push_top-1]=$dir
+        ;;
+    1)  # pushd
+        _push_stack[_push_top]=$dir
+        ;;
+    2)  # push +n
+        type=${1#+} i=_push_top-1
+        set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}"
+        shift $type
+        for dir
+        do  (((i=i+1) < _push_max)) || break
+            _push_stack[i]=$dir
+        done
+    esac
+    dirs
+}
+
+# Pops the top directory
+function popd
+{
+    typeset dir
+    if    ((_push_top >= _push_max))
+    then  print popd: Nothing to pop.
+          return 1
+    fi
+    case $1 in  
+    "")
+        dir=${_push_stack[_push_top]}
+        case $dir in
+        \~*)   dir=$HOME${dir#\~}
+        esac
+        cd "$dir" || return 1
+        ;;
+    +[1-9]|+[1-9][0-9])
+        typeset savedir
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        while ((i > _push_top))
+        do _push_stack[i]=${_push_stack[i-1]}
+              i=i-1
+        done
+        ;;
+    *)  print pushd: Bad directory.
+        return 1
+    esac
+    unset '_push_stack[_push_top]'
+    _push_top=_push_top+1
+    dirs
+}

+ 12 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/emacs_keybind.txt

@@ -0,0 +1,12 @@
+typeset -A Keytable
+trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
+function emacs_keybind
+{
+	keybind $'\E[A' $'\020'	# Up key
+	keybind $'\E[B' $'\016'	# Down key
+	keybind $'\E[C' $'\06'	# Right key
+	keybind $'\E[D' $'\02'	# Left key
+	keybind $'\E[H' $'\01'	# Home key
+	keybind $'\E[Y' $'\05'	# End key
+	keybind $'\t' $'\E\E'	# Tab for command-line completion	
+}

+ 28 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/getopt.txt

@@ -0,0 +1,28 @@
+function getopt
+{
+	typeset c optstring=$1 options= sep=
+	shift
+	while	getopts $optstring c
+	do	case $c in
+		[:?])	
+			exit 2
+			;;
+		*)
+			options="$options$sep-$c"
+			sep=' '
+			if	[[ $optstring == *$c:* ]]
+			then	options=" $options $OPTARG"
+			fi
+			#then	print -rn -- " -$c" "$OPTARG"
+			#else	print -rn -- " -$c"
+			;;
+		esac
+	done
+	print -rn -- "$options"
+	if	[[ ${@:$OPTIND-1} != -- ]]
+	then	print -rn -- " --"
+	fi
+	if	[[ -n ${@:$OPTIND} ]]
+	then	print -r -- " ${@:$OPTIND}"
+	fi
+}

+ 14 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/keybind.txt

@@ -0,0 +1,14 @@
+typeset -A Keytable
+trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
+function keybind # key action
+{ 
+	typeset key=$(print -f "%q" "$2")
+	case $# in
+	2)	Keytable[$1]='.sh.edchar=${.sh.edmode}'"$key"
+		;;
+	1)	unset Keytable[$1]
+		;;
+	*)	print -u2 "Usage: $0 key [action]"
+		;;
+	esac
+}

+ 111 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/popd.txt

@@ -0,0 +1,111 @@
+#
+# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS
+#
+# Uses global parameters _push_max _push_top _push_stack
+integer _push_max=100 _push_top=100
+# Display directory stack -- $HOME displayed as ~
+function dirs
+{
+    typeset dir="${PWD#$HOME/}"
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    print -r - "$dir ${_push_stack[@]}"
+}
+
+# Change directory and put directory on front of stack
+function pushd
+{
+    typeset dir= type=0
+    integer i
+    case $1 in
+    "") # pushd
+        if    ((_push_top >= _push_max))
+        then  print pushd: No other directory.
+              return 1
+        fi
+        type=1 dir=${_push_stack[_push_top]}
+        ;;
+    +[1-9]|+[1-9][0-9]) # pushd +n
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        type=2 dir=${_push_stack[i]}
+        ;;
+    *)  if    ((_push_top <= 0))
+        then  print pushd: Directory stack overflow.
+              return 1
+        fi
+    esac
+    case $dir in
+    \~*)   dir=$HOME${dir#~}
+    esac
+    cd "${dir:-$1}" > /dev/null || return 1
+    dir=${OLDPWD#$HOME/}
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    case $type in
+    0)  # pushd name
+        _push_stack[_push_top=_push_top-1]=$dir
+        ;;
+    1)  # pushd
+        _push_stack[_push_top]=$dir
+        ;;
+    2)  # push +n
+        type=${1#+} i=_push_top-1
+        set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}"
+        shift $type
+        for dir
+        do  (((i=i+1) < _push_max)) || break
+            _push_stack[i]=$dir
+        done
+    esac
+    dirs
+}
+
+# Pops the top directory
+function popd
+{
+    typeset dir
+    if    ((_push_top >= _push_max))
+    then  print popd: Nothing to pop.
+          return 1
+    fi
+    case $1 in  
+    "")
+        dir=${_push_stack[_push_top]}
+        case $dir in
+        \~*)   dir=$HOME${dir#~}
+        esac
+        cd "$dir" || return 1
+        ;;
+    +[1-9]|+[1-9][0-9])
+        typeset savedir
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        while ((i > _push_top))
+        do _push_stack[i]=${_push_stack[i-1]}
+              i=i-1
+        done
+        ;;
+    *)  print pushd: Bad directory.
+        return 1
+    esac
+    unset '_push_stack[_push_top]'
+    _push_top=_push_top+1
+    dirs
+}

+ 111 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/pushd.txt

@@ -0,0 +1,111 @@
+#
+# DIRECTORY MANIPULATION FUNCTIONS PUSHD, POPD AND DIRS
+#
+# Uses global parameters _push_max _push_top _push_stack
+integer _push_max=100 _push_top=100
+# Display directory stack -- $HOME displayed as ~
+function dirs
+{
+    typeset dir="${PWD#$HOME/}"
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    print -r - "$dir ${_push_stack[@]}"
+}
+
+# Change directory and put directory on front of stack
+function pushd
+{
+    typeset dir= type=0
+    integer i
+    case $1 in
+    "") # pushd
+        if    ((_push_top >= _push_max))
+        then  print pushd: No other directory.
+              return 1
+        fi
+        type=1 dir=${_push_stack[_push_top]}
+        ;;
+    +[1-9]|+[1-9][0-9]) # pushd +n
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        type=2 dir=${_push_stack[i]}
+        ;;
+    *)  if    ((_push_top <= 0))
+        then  print pushd: Directory stack overflow.
+              return 1
+        fi
+    esac
+    case $dir in
+    \~*)   dir=$HOME${dir#\~}
+    esac
+    cd "${dir:-$1}" > /dev/null || return 1
+    dir=${OLDPWD#$HOME/}
+    case $dir in
+    $HOME)
+        dir=\~
+        ;;
+    /*) ;;
+    *)  dir=\~/$dir
+    esac
+    case $type in
+    0)  # pushd name
+        _push_stack[_push_top=_push_top-1]=$dir
+        ;;
+    1)  # pushd
+        _push_stack[_push_top]=$dir
+        ;;
+    2)  # push +n
+        type=${1#+} i=_push_top-1
+        set -- "${_push_stack[@]}" "$dir" "${_push_stack[@]}"
+        shift $type
+        for dir
+        do  (((i=i+1) < _push_max)) || break
+            _push_stack[i]=$dir
+        done
+    esac
+    dirs
+}
+
+# Pops the top directory
+function popd
+{
+    typeset dir
+    if    ((_push_top >= _push_max))
+    then  print popd: Nothing to pop.
+          return 1
+    fi
+    case $1 in  
+    "")
+        dir=${_push_stack[_push_top]}
+        case $dir in
+        \~*)   dir=$HOME${dir#\~}
+        esac
+        cd "$dir" || return 1
+        ;;
+    +[1-9]|+[1-9][0-9])
+        typeset savedir
+        integer i=_push_top$1-1
+        if    ((i >= _push_max))
+        then  print pushd: Directory stack not that deep.
+              return 1
+        fi
+        while ((i > _push_top))
+        do _push_stack[i]=${_push_stack[i-1]}
+              i=i-1
+        done
+        ;;
+    *)  print pushd: Bad directory.
+        return 1
+    esac
+    unset '_push_stack[_push_top]'
+    _push_top=_push_top+1
+    dirs
+}

+ 54 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/title.txt

@@ -0,0 +1,54 @@
+# add to (+), delete from (-), print (.), or set ([=]) window title
+# arguments are eval'd before printing
+# title text string exported in TITLE_TEXT
+
+function title # [+ | - | =] title ...
+{
+	typeset	x t="$TITLE_TEXT"
+
+	case $1 in
+	+)	shift
+		case $# in
+		0)	;;
+		*)	for x
+			do	case " $t " in
+				*" $x "*)	;;
+				"  ")		t=$x ;;
+				*)		t="$t $x" ;;
+				esac
+			done
+			case $t in
+			$TITLE_TEXT)	return 1 ;;
+			esac
+			;;
+		esac
+		;;
+	-)	shift
+		case $# in
+		0)	;;
+		*)	for x
+			do	case " $t " in
+				*" $x "*)	t="${t%?( )$x*}${t##*$x?( )}" ;;
+				esac
+			done
+			case $t in
+			$TITLE_TEXT)	return 1 ;;
+			esac
+			;;
+		esac
+		;;
+	.)	print -r -- "$TITLE_TEXT"
+		return 0
+		;;
+	*)	t="$*"
+		;;
+	esac
+	export TITLE_TEXT="$t"
+	eval x=\"$t\"
+	case $TERM in
+	630*)	print -nr -- "[?${#x};0v$x" ;;
+	vt100|xterm*)	print -nr -- "]0;$x" ;;
+	*)	return 1 ;;
+	esac
+	return 0
+}

+ 10 - 0
cde/programs/dtksh/ksh93/docs/ksh/functions/vi_keybind.txt

@@ -0,0 +1,10 @@
+typeset -A Keytable
+trap 'eval "${Keytable[${.sh.edchar}]}"' KEYBD
+function vi_keybind
+{
+	keybind $'\E[A' k # Up key
+	keybind $'\E[B' j # Down key
+	keybind $'\E[C' l # Right key
+	keybind $'\E[D' h # Left key
+	keybind $'\t' '\' # Tab for command-line completion
+}

+ 10 - 0
cde/programs/dtksh/ksh93/docs/ksh/index.html

@@ -0,0 +1,10 @@
+<html>
+<head><title>KSH93</title></head>
+<body>
+<a href='ksh.html'>Overview</a><br>
+<a href='faq.html'>FAQ</a><br>
+<a href='features.html'>Features</a><br>
+<a href='builtins.html'>Builtins</a><br>
+<a href='examples.html'>Examples</a>
+</body>
+</html>

+ 118 - 0
cde/programs/dtksh/ksh93/docs/ksh/ksh.html

@@ -0,0 +1,118 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<TITLE> www/ksh/ksh.mm mm document </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ float:left; clear:both; }
+dd	{ margin-left:3em; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+
+
+<P>
+<P><CENTER><FONT color=red><FONT face=courier><H3><A name="ksh overview">ksh overview</A></H3></FONT></FONT></CENTER>
+The
+<STRONG>KornShell</STRONG>
+language was designed and developed by David G. Korn at AT&amp;T Bell Laboratories and AT&amp;T Research.
+It is an interactive command language that provides access to the UNIX system and to many other systems,
+on the many different computers and workstations on which it is implemented.
+The
+<STRONG>KornShell</STRONG>
+language is also a complete, powerful, high-level programming language for writing applications,
+often more easily and quickly than with other high-level languages.
+This makes it especially suitable for prototyping.
+There are two other widely used shells, the Bourne shell developed by Steven Bourne at AT&amp;T Bell Laboratories,
+and the C shell developed by Bill Joy at the University of California.
+<STRONG>ksh</STRONG>
+has the best features of both, plus many new features of its own.
+Thus
+<STRONG>ksh</STRONG>
+can do much to enhance your productivity and the quality of your work,
+both in interacting with the system, and in programming.
+<STRONG>ksh</STRONG>
+programs are easier to write, and are more concise and readable than programs written in a lower level language such as C.
+<P>
+The new version of
+<STRONG>ksh</STRONG>
+has the functionality of other scripting languages such as awk, icon, perl, rexx, and tcl.
+For this and many other reasons,
+<STRONG>ksh</STRONG>
+is a much better scripting language than any of the other popular shells.
+The code size for
+<STRONG>ksh</STRONG>
+is larger than the Bourne shell or C shell programs.
+The revised version is even larger.
+<P>
+In spite of its increased size,
+<STRONG>ksh</STRONG>
+provides better performance.
+You can write programs to run faster with
+<STRONG>ksh</STRONG>
+than with either the Bourne shell or the C shell, sometimes an order of magnitude faster.
+<STRONG>ksh</STRONG>
+has evolved and matured with extensive user feedback.
+It has been used by many thousands of people at AT&amp;T since 1982, and at many other companies and universities.
+A survey conducted at one of the largest AT&amp;T Bell Laboratories computer centers showed that 80% of their customers, both programmers and non-programmers, use
+<STRONG>ksh.</STRONG>
+<STRONG>ksh</STRONG>
+is compatible with the Bourne shell.
+Virtually all programs written for the Bourne shell run with
+<STRONG>ksh.</STRONG>
+If you are familiar with the Bourne shell, you can use
+<STRONG>ksh</STRONG>
+immediately, without retraining.
+The new version of
+<STRONG>ksh</STRONG>
+is compatible with earlier versions of
+<STRONG>ksh.</STRONG>
+<STRONG>ksh</STRONG>
+is readily available.
+It is sold (source and binary) by AT&amp;T and Novell, and by other companies under license from AT&amp;T both in the USA and abroad.
+It has been purchased by dozens of major corporations, and by many individuals for use on home computers.
+<STRONG>ksh</STRONG>
+is extensible.
+<P>
+The
+<STRONG>KornShell</STRONG>
+language uses the same syntax for built-in commands as for non built-in commands.
+Therefore, system developers can add new commands "transparently" to the
+<STRONG>KornShell</STRONG>
+language; that is, with minimum effort and with no differences visible to users other than faster execution.
+On systems with dynamic linking, it is possible to add new built-in commands at run time.
+Novell has extended the new version of
+<STRONG>ksh</STRONG>
+to enable X-windows programming for their desktop
+<STRONG>ksh</STRONG>
+product,
+<STRONG>dtksh</STRONG>.
+<STRONG>dtksh</STRONG>
+is a standard part of CDE, the Common Desktop Environment defined by COSE (Common Operating System Environment), supported by most major UNIX system hardware vendors.
+An extended version of
+<STRONG>ksh</STRONG>
+that enables Tk programming, called tksh, is available as well.
+<P>
+<STRONG>ksh</STRONG>
+is intended to conform to the Shell Language Standard developed by the IEEE POSIX 1003.2 Shell and Utilities Language Committee.
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>March 13, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 129 - 0
cde/programs/dtksh/ksh93/docs/ksh/scripts/cgi-lib.ksh.txt

@@ -0,0 +1,129 @@
+typeset -A COOKIE HEADER
+typeset Cgi _CGI_c _CGI_multipart
+
+function cgi_header
+{
+	typeset h
+	for h in "${!HEADER[@]}"
+	do	printf '%s: %s\n' "$h" "${HEADER[$h]}"
+	done
+	print
+}
+
+function cgi_url 
+{
+	if [[ $SERVER_PORT != 80 ]]
+	then	print "http://$SERVER_NAME:$SERVER_PORT$SCRIPT_NAME"
+	else	print "http://$SERVER_NAME$SCRIPT_NAME"
+	fi
+}
+
+function cgi_parse
+{
+	if	[[ $REQUEST_METHOD == POST ]]
+	then	if	[[ $CONTENT_TYPE ==  multipart/form-data* ]]
+		then	_CGI_multipart=${TMPDIR-/tmp}/cgi-form-$$
+			trap 'rm -rf "$_CGI_multipart"' EXIT
+			mkdir $_CGI_multipart
+			unset -f Cgi.set
+			typeset -A Cgi.file
+			typeset i b v
+			pax --nosummary --read --edit ",.*/,," --edit ",^,$_CGI_multipart/,"
+			for i in $_CGI_multipart/*
+			do      b=${i##*/}
+				if	[[ $b == +([a-z]) ]]
+				then	 v=$(<$i)
+					eval Cgi.$b='$v'
+				else	Cgi.file[$b]=$i
+				fi
+			done
+		else	Cgi=$(<&0)		# Read from stdin
+		fi
+	else	Cgi="$QUERY_STRING"
+	fi
+	cgi_cookie "$HTTP_COOKIE"
+	HEADER["Content-type"]="text/html"
+}
+
+function cgi_cookie
+{
+	typeset cookie=$1 name val c IFS=';'
+	set -- $cookie
+	for c
+	do
+		IFS='='
+		set -- $c
+		name=${1##' '} val=${2##' '}		# trim white space
+		name=${name%%' '} val=${val%%' '}
+		COOKIE[$name]=$val
+	done
+}
+
+function cgi_setcookie # name value
+{
+	HEADER["Set-Cookie"]="$1=$2; path=$SCRIPT_NAME"
+}
+
+## Cgi variable disciplines
+
+function Cgi.set
+{
+	set -f
+	typeset i j n val IFS='&'
+	set -- ${.sh.value}
+	for i
+	do	n=${i%%=*}
+		[[ $n == [[:alpha:]_]*([[:alnum:]_]) ]] || continue
+		val=${i#$n=}
+		val=${val//+/ }
+		val=${val//@([\'\\])/'\'\1}
+		eval j=\${#${.sh.name}.${n}[@]} \
+			"${.sh.name}.${n}[j]=\$'${val//'%'@(??)/'\x'\1"'\$'"}'"
+	done
+}
+
+function cgi_C_init
+{
+	integer i
+	for ((i=1; i < 256; i++))
+	do	if	(( i!=16#22 && i!=16#27 && i!=16#5C && i!=16#5B && i!=16#5D ))
+		then	printf $'_CGI_c[$\'\\\\x%.2X\']=%%%.2X\n'  $i $i
+		fi
+	done
+	print
+}
+
+function cgi_encode
+{
+	typeset v=$1
+	var=${v//' '/+}
+	cbrace='}'
+	eval var=${var//@([!a-zA-Z0-9_+])/\${_CGI_c[\\\1]$cbrace}
+	print -r -- "$var"
+}
+
+function Cgi.get
+{
+	typeset i val name vname
+	if	[[ ! ${_CGI_c[\\]} ]]
+	then	val='"'
+		_CGI_c[""]=%00
+		_CGI_c[$var]=%22
+		_CGI_c[\']=%27
+		_CGI_c[\]]=%5B
+		_CGI_c[\[]=%5D
+		_CGI_c[\\]=%5C
+		eval $(cgi_C_init)
+		unset -f cgi_C_init
+	fi
+	vname=${.sh.name}		# .sh.name contains variable name
+	.sh.value=			# .sh.value stores value
+	for i in ${!Cgi.@}
+	do	
+		name=${i#$vname.}
+		nameref v=${i}
+		val=$(cgi_encode "$v")
+		.sh.value="${.sh.value}${.sh.value:+&}$name=$val"
+	done
+}
+

+ 17 - 0
cde/programs/dtksh/ksh93/docs/ksh/scripts/dump-cgi.ksh.txt

@@ -0,0 +1,17 @@
+#!/bin/ksh
+
+. ./cgi-lib.ksh
+
+cgi_parse
+cgi_header
+
+print "<html>"
+print "<pre>"
+print -r "Url: $(cgi_url)"
+for i in ${!Cgi.*}
+do
+	nameref val=$i
+	print -r "$i = $val"
+done
+print "</pre>"
+print "</html>"

+ 66 - 0
cde/programs/dtksh/ksh93/docs/ksh/scripts/env.txt

@@ -0,0 +1,66 @@
+#! /usr/bin/ksh
+# shell version of env command
+case $(getopts '[-]' opt '--???man' 2>&1) in
+version=[0-9]*)
+    usage=$'[-?@(#)env (AT&T Labs Research) 1999-05-20\n]
+        [-author?David Korn <dgkorn@gmail.com>]
+        [-license?http://www.research.att.com/sw/tools/reuse]
+        [+NAME?env - set environment for command invocation]
+        [+DESCRIPTION?\benv\b modifies the current environment according
+		to the \aname\a\b=\b\avalue\a arguments, and then
+		invokes \acommand\a with the modified environment.]
+	[+?If \acommand\a is not specified, the resulting environment
+		is written to standard output quoted as required for
+		reading by the \bsh\b.]
+	[i:ignore-environment?Invoke \acommand\a with the exact environment
+		specified by the \aname\a\b=\b\avalue\a arguments; inherited
+		environment variables are ignored.  As an obsolete feature,
+		\b-\b by itself can be specified instead of \b-i\b.]
+	[u:unset]:[name?Unset the environment variable \aname\a if it was
+		in the environment.  This option can be repeated to unset
+		additional variables.]
+
+	[name=value]... [command ...]
+
+	[+EXIT STATUS?If \acommand\a is invoked, the exit status of \benv\b
+		will be that of \acommand\a.  Otherwise, it will be one of
+		the following:]{
+	        [+0?\benv\b completed successfully.]
+	        [+126?\acommand\a was found but could not be invoked.]
+	        [+127?\acommand\a could not be found.]
+	}
+        [+SEE ALSO?\bsh\b(1), \bexport\b(1)]
+    '
+    ;;
+*)
+    usage='iu:[name] [name=value]... [command ...]'
+    ;;
+esac
+clear=
+while	getopts  "$usage" var
+do	case $var in
+	i)	clear=1;;
+	u)	command unset $OPTARG 2> /dev/null;;
+	esac
+done
+#[[ $var == "" ]] || exit 1
+shift $((OPTIND-1))
+if	[[ $1 == - ]]  # obsolete form
+then	clear=1
+	shift
+fi
+if	[[ $clear == 1 ]]
+then	typeset +x $(typeset +x)
+fi
+while	true
+do	case $1 in
+	*=*)	export "$1";;
+	*) break;;
+	esac
+	shift
+done
+if	(( $# >0 ))
+then	exec "$@"
+else	export
+	exit 0
+fi

+ 2 - 0
cde/programs/dtksh/ksh93/docs/ksh/scripts/line.txt

@@ -0,0 +1,2 @@
+#! /bin/ksh
+read -r && print -r -- "$REPLY"

+ 2 - 0
cde/programs/dtksh/ksh93/docs/ksh/scripts/which.txt

@@ -0,0 +1,2 @@
+#! /bin/ksh
+whence -p "$@"

+ 260 - 0
cde/programs/dtksh/ksh93/lib/package/CONVERT.mk

@@ -0,0 +1,260 @@
+/*
+ * {automake|configure} => {nmake|iffe} conversion support
+ *
+ * The first command line target overrides the default original source
+ * directory name $(MAKEFILE:D). The hard work is in the makefile using
+ * these assertions, since it must (manually) provide the nmake makefiles
+ * and config equivalent iffe scripts. The conversion makefile is typically
+ * named lib/package/PACKAGE.cvt in an ast package $PACKAGEROOT directory,
+ * and the conversion is run from the $PACKAGEROOT directory, e.g.:
+ *
+ *	nmake -I lib/package -f PACKAGE-VERSION/PACKAGE.cvt
+ *
+ * The conversion requires the ast nmake, pax and tw commands.
+ *
+ * After the conversion you will be liberated from ./configure, *.in,
+ * *.am, automake, autom4te, libtool, make depend, and makefile
+ * recursion ordering. You can build from $PACKAGEROOT using the ast
+ * package(1) (which sets up the { HOSTTYPE PATH VPATH } environment):
+ *
+ *	package make
+ *
+ * or cd into any arch/$HOSTTYPE/src subdirectory and rebuild that portion
+ * of the hierarchy with the ast nmake(1) (after setting PATH and VPATH):
+ *
+ *	nmake
+ *
+ * The conversion assertions are:
+ *
+ *	package :CONVERT: file ...
+ *
+ *	    files in the original source directory are copied
+ *	    and converted into the ./src and ./lib subdirectories 
+ *	    the default original source directory is ./original
+ *
+ *		package	package name
+ *		file	original source file that must exist
+ *
+ *	:OMIT: pattern
+ *
+ *	    files matching pattern are not copied into the converted
+ *	    directory
+ *
+ *		pattern	ksh pattern of files to omit
+ *
+ *	:COPY: from to [ file ... ]
+ *
+ *	    files in the from directory are copied to the to directory
+ *	    the action may contain :MOVE: exceptions to the copy
+ *
+ *		from	original directory subdirectory
+ *			  . names the original directory
+ *			 .. names the 
+ *		to	converted subdirectory
+ *			  libNAME => src/lib/libNAME
+ *			     NAME => src/cmd/NAME
+ *		file	files or files in subdirectories to be copied;
+ *			explicit files are copied to the to directory;
+ *			if no files are specified then the from hierarchy
+ *			is recursively copied to the converted directory
+ *
+ *	:MOVE: to file ...
+ *
+ *	    :COPY: assertion exceptions placed in the assertion's action
+ *
+ *		to	files or subdirectory files are copied to this directory
+ *		file	file or files in subdirectories to be copied
+ *
+ *	:FILE: to file <<!
+ *	contents
+ *	!
+ *
+ *	    the :FILE: action is copied to the named file in the to directory
+ *	    the :FILE: action is usually specified using the here syntax to
+ *	    avoid make comment, quote and variable expansion
+ *
+ *	:EDIT: to file ... | - pattern <<!
+ *	edit script
+ *	!
+ *
+ *	    the :EDIT: action is an ed(1) script applied to each file in the
+ *	    to directory after it has been copied from the original source
+ *	    directory; if to is - then the :EDIT: action is a sed(1) script
+ *	    that is applied to all files matching the file pattern during the
+ *	    copy from the original source directory; a file may be subject to
+ *	    both a sed(1) and ed(1) :EDIT:; the :EDIT: action is usually
+ *	    specified using the here syntax to avoid make comment, quote and
+ *	    variable expansion
+ */
+
+.CONVERT.ID. = "@(#)$Id: CONVERT (AT&T Research) 2004-03-19 $"
+
+set nojobs noscan nowriteobject writestate=$$(MAKEFILE).ms
+
+package = $(PWD:B)
+here = !-=-=-=-=-!
+hierarchy = src src/cmd src/lib
+omit = .*|*.?(l)[ao]
+original = $(MAKEFILE:D)
+showedit = $(-debug:?p??)
+
+CPFLAGS = -u
+PAXFLAGS = -u -v
+STDEDFLAGS = -
+TW = tw
+TWFLAGS = -CP
+
+all  : .VIRTUAL file
+file : .VIRTUAL edit
+edit : .VIRTUAL copy
+copy : .VIRTUAL init
+init : .VIRTUAL
+
+.MAKEINIT : .cvt.init
+
+.cvt.init : .MAKE .VIRTUAL .FORCE
+	local D
+	if D = "$(~.ARGS:O=1)"
+		if "$(D:T>FD)"
+			original := $(D)
+			.ARGS : .CLEAR $(~.ARGS:O>1)
+		end
+	end
+
+.cvt.filter =
+.cvt.package =
+
+.cvt.atom : .FUNCTION
+	local N V
+	V := $(%:O=1)
+	let .cvt.$(V) = .cvt.$(V) + 1
+	return .cvt.$(V).$(.cvt.$(V))
+
+.cvt.omit : .FUNCTION
+	return -s',^\(\(?K)?(*/)($(omit))?(/*))$,,$(showedit)'
+
+.cvt.to : .FUNCTION
+	if "$(%)" == "."
+		return src
+	end
+	if "$(%)" == "*/*"
+		return src/$(%)
+	end
+	if "$(%)" == "lib*"
+		return src/lib/$(%)
+	end
+	return src/cmd/$(%)
+
+":CONVERT:" : .MAKE .OPERATOR
+	local I
+	package := $(<)
+	I := $(hierarchy:C,$,/Makefile)
+	init : .cvt.verify $(I)
+	$(I) : .ACCEPT
+		test -d $(<:D) || $(MKDIR) -p $(<:D)
+		echo :MAKE: > $(<)
+	.cvt.verify : .MAKE .FORCE .REPEAT
+		local I
+		if I = "$(.cvt.package:T!=F)"
+			error 3 $(original): not a $(package) source directory: missing $(I)
+		end
+	.cvt.package := $(>:C,^,$$(original)/,)
+
+":COPY:" : .MAKE .OPERATOR
+	local F T I A
+	F := $(>:O=1)
+	T := $(.cvt.to $(>:O=2))
+	A := $(.cvt.atom copy)
+	copy : $(A)
+	$(A) : .VIRTUAL
+	if F == "."
+		$(A) : $(T)
+		$(T) :
+			test -d $(<) || $(MKDIR) -p $(<)
+		for I $(>:O>2)
+			eval
+			$$(A) : $(I:D=$(T):B:S)
+			$(I:D=$(T):B:S) : $$(original)/$(I)
+				$$(CP) $$(CPFLAGS) $$(*) $$(<)
+			end
+		end
+	elif "$(F:T=FF)" || "$(F:N=*.(pax|t[bg]z))"
+		eval
+		$$(A) : $$(F)
+			test -d $(T) || $$(MKDIR) -p $(T)
+			cd $(T)
+			$$(PAX) $$(PAXFLAGS) -rf $$(*:P=A) -s ',^$(>:O=2)/*,,' $(.cvt.omit) $(.cvt.filter)
+		end
+	else
+		F := $$(original)/$(F)
+		if ! "$(@:V)"
+			eval
+			$$(A) : .FORCE
+				test -d $(T) || $$(MKDIR) -p $(T)
+				cd $(F:V)
+				$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.filter) $(T:P=A)
+			end
+		else
+			.cvt.move =
+			: $(@:V:@R)
+			eval
+			$$(A) : .FORCE
+				test -d $(T) || $$(MKDIR) -p $(T)
+				cd $(F:V)
+				$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.move) $(.cvt.filter) $(T:P=A)
+			end
+		end
+	end
+
+":EDIT:" : .MAKE .OPERATOR
+	local A D F
+	D := $(>:O=1)
+	if D == "-"
+		A := ^$(>:O=2)^$$(SED) -e $(@:Q:/'\n'/ -e /G)
+		.cvt.filter += --action=$(A:@Q)
+	else
+		D := $(.cvt.to $(D))
+		F := $(>:O>1:C,^,$(D)/,)
+		edit : $(F)
+		eval
+		$$(F) :
+			$$(STDED) $$(STDEDFLAGS) $$(<) <<'$(here)'
+			$(@:V)
+			w
+			q
+			$(here)
+		end
+	end
+
+":FILE:" : .MAKE .OPERATOR
+	local ( D F ) $(>)
+	local A
+	A := $(.cvt.atom file)
+	$(A) := $(@:V)
+	D := $(.cvt.to $(D))
+	file : $(D)/$(F)
+	eval
+	$$(D)/$$(F) :
+		test -d $$(<:D) || $$(MKDIR) -p $$(<:D)
+		cat > $$(<) <<'$(here)'
+		$$($(A):V)
+		$(here)
+	end
+
+":MOVE:" : .MAKE .OPERATOR
+	local T I
+	T := ../../../$(.cvt.to $(>:O=1))
+	for I $(>:O>1)
+		if I == "*/"
+			.cvt.move += -s',^\(\(?K)$(I)),$(T)/,$(showedit)'
+			.cvt.move += -s',^\(\(?K)$(I:C%/$%%))$,,$(showedit)'
+		else
+			.cvt.move += -s',^\(\(?K)$(I))$,$(T)/$(I:B:S),$(showedit)'
+		end
+	end
+
+":OMIT:" : .MAKE .OPERATOR
+	local P
+	for P $(>)
+		omit := $(omit)|$(P)
+	end

+ 1029 - 0
cde/programs/dtksh/ksh93/lib/package/INIT.README

@@ -0,0 +1,1029 @@
+The INIT package is required by all but the standalone and self
+extracting archive packages. It contains the package command, support
+scripts, and utilities.  The package command installs binary packages,
+makes source packages, and generates new package tarballs.
+
+Source Package Installation Instructions:
+
+  (1) Do not install packages as root/super-user. Although some components may
+      have setuid executables, few must be owned by root. These are best
+      changed manually when the security implications are understood.
+  (2) Choose a package root directory and cd to it. This will be a local work
+      area for all packages.
+  (3) These instructions bypass the click to download package links on the
+      download site. If you already clicked, or if your system does not have
+      curl(1), hurl(1), lynx(1) or wget(1) then use the alternate instructions
+      for (3),(4),(5) in plan B below. Plan B installs the hurl(1)
+      script which works with ksh and modern bash. The top level URL is:
+		URL=http://www.research.att.com/sw/download
+  (4) If the bin/package script does not exist then run:
+		test -d bin || mkdir bin
+		url=$URL/package
+		(wget -O - $url||curl -L $url||hurl $url) > bin/package
+		chmod +x bin/package
+  (5) Determine the list of package names you want from the download site, then
+      use the package(1) command to do the actual download:
+		bin/package authorize "NAME" password "PASSWORD" \
+			setup source $URL PACKAGE ...
+      (Refer to the AUTHORIZATION paragraph on the main download page for
+      NAME/PASSWORD details.)  This downloads the closure of the latest
+      source package(s); covered and up-to-date packages are not downloaded again unless
+      package force ... is specified. Package content is verified using md5sum.
+      If the package root will contain only one architecture then you can install in bin and
+      lib instead of arch/HOSTTYPE/bin and arch/HOSTTYPE/lib by running this
+      instead:
+		bin/package authorize "NAME" password "PASSWORD" \
+			flat setup source $URL PACKAGE ...
+      To update the same packages from the same URL run:
+		bin/package setup source
+  (6) Build and install; all generated files are placed under arch/HOSTTYPE
+      ($INSTALLROOT), where HOSTTYPE is the output of bin/package (with no
+      arguments.) name=value arguments are supported; CC and debug=1 (compile
+      with -g instead of -O) are likely candidates. The output is written to
+      the terminal and captured in $INSTALLROOT/lib/package/gen/make.out:
+		bin/package make
+  (7) List make results and interesting errors:
+		bin/package results
+      Run the regression tests:
+		bin/package test
+      List test results and errors:
+		bin/package results test
+  (8) The generated binaries are position independent, i.e., they do not
+      contain hard-coded paths. However, commands with related files, like
+      file(1) and nmake(1), require the path of the bin directory to be
+      exported in PATH.
+  (9) You can run the binaries directly from the package root, or you can
+      install them in a public root after you are satisfied with the make and
+      test actions (requires the AT&T nmake(1) command):
+		bin/package flat install DIRECTORY PACKAGE
+      This will install in DIRECTORY/bin and DIRECTORY/lib. If you want to
+      preserve the arch/HOSTTYPE hierarchy under DIRECTORY then omit the
+      flat argument. If you don't have nmake(1) then the following will do a
+      flat install:
+		cd $INSTALLROOT
+		cp -p -r bin lib include DIRECTORY
+  (10) To summarize, after the first time the download, build, and test cycle
+      for the latest source release is:
+		bin/package setup source
+		bin/package make
+		bin/package test
+
+Source Package Installation Instructions -- Plan B:
+
+  (3) Create the subdirectory lib/package/tgz and download all package archives
+      into that directory.
+  (4) If the bin/package script does not exist then manually read the INIT
+      source package:
+		gunzip < lib/package/tgz/INIT.YYYY-MM-DD.tgz | tar xvf -
+      Note that some browsers automatically unzip downloaded without warning.
+      If the gunzip fails try:
+		tar xvf - lib/package/tgz/INIT.YYYY-MM-DD.tgz
+      If your system does not have tar(1) or gunzip(1) then download the ratz
+      source package, compile it, and manually read the INIT
+      source package:
+		mkdir bin
+		cp lib/package/tgz/ratz.YYYY-MM-DD.c lib/package/tgz/ratz.c
+		cc -o bin/ratz lib/package/tgz/ratz.c
+		bin/ratz -lm < lib/package/tgz/INIT.YYYY-MM-DD.tgz
+  (5) Read all unread package archive(s):
+		bin/package read
+      Both source and binary packages will be read by this step.
+
+All recorded changes follow.
+
+:::::::: INIT ::::::::
+
+12-07-17 iffe.sh: add C code NOTE("...") to amend --verbose output
+12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo()
+12-06-20 package.sh: use $KSH for rt in "results test"
+12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-13 package.sh: handle admin.db column output
+12-06-08 iffe.sh: fix 12-06-06 typo
+12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last & -lm)
+12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile
+12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h => $(INSTALLROOT)/$(ID)/prototyped.h
+12-05-28 iffe.sh: api foo YYYYMMDD => FOOAPI(rel) test macro
+12-05-24 package.sh: change admin.db comment => owner attributes
+12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit
+12-04-17 package.sh: skip sh version logic for ``use''
+12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE => _LARGE_FILE_API moved to libast/features
+12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE
+12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness
+12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list
+12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH
+12-02-29 package.sh: fix ksh vs -lcmd compatibility checks
+12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
+12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
+12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
+12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
+12-01-21 Makefile: :PACKAGE: license=ast -- oops
+12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs
+11-12-13 iffe.sh: add /*<NOSTDIO>*/ test code comment to disable default #include <stdio.h>
+11-11-11 C+probe: test for .so before .sl
+11-10-26 package.sh: don't forget about *.pkg for admin update
+11-10-18 cc.*-icc: update and add more
+11-10-11 package.sh: handle package make|view when no source installed
+11-09-11 package.sh: count admin '*** termination code' errors
+11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps
+11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...''
+11-08-29 iffe.sh: trap EXIT => trap 0 for ancient sh
+11-08-11 iffe.sh: handle ancient sort that doesn't have -k
+11-06-01 make.probe: add more /lib64 logic
+11-05-01 package.sh: fix admin ditto to sync LICENSES too
+11-03-25 package.sh: initialize { $SED $TR } before first use!
+11-03-21 package.sh: fix vpath probes
+11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.*
+11-02-24 package.sh: change curl usage to "curl -L ..."
+11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archaic.*###
+11-02-02 Makefile: add :MAPLIB: check for ancient -lw
+11-02-02 make.probe: handle -print-multi-directory => 64 => /usr/lib64 /lib64
+11-02-02 package.sh: HOSTTYPE=*,*cc*[,-*,...] sets CC [ and CCFLAGS ]
+11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks
+11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream
+11-01-07 iffe.sh: check debug==3 for is_hdr() failure
+10-11-22 ditto.sh: fix timing problem between |& and exec &p
+10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path
+10-10-10 package.sh: list main env vars at start of make action
+10-10-10 ratz.c: tweak windows delays
+10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC
+10-09-01 package.sh: fix ratz from source logic
+10-08-25 package.mk: consolidate license file search in .package.licenses.
+10-08-22 ratz.c: run sear bootstrap command detached
+10-08-20 C+probe: version_stamp only if version_flags works
+10-08-17 package.sh: unset makerules *DIR variables in env
+10-08-15 package.sh: "make" action now lists some env values
+10-08-11 mktest.sh: add "DO command ..."
+10-07-27 rt.sh: handle "rt X=Y ..."
+10-06-29 ratz.c: non-option sear args passed to sear_exec()
+10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings
+10-06-25 package.sh: "force admin ditto" => no ditto --update option
+10-06-22 C+probe: handle cc that require .[ci] input for version info
+10-06-21 ditto.sh: change default remote access to ssh (about time)
+10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
+10-06-09 package.sh: add AT&T to usable nmake check
+10-06-06 iffe.sh,iffe.tst: add { api ver } ops
+10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info
+10-04-15 iffe.sh: don't forget candidate headers for hdr|sys!
+10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1)
+10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH
+10-02-11 package.sh: fix package admin make report error count
+10-02-02 package.sh: fix write binary bug that did scp on local fs
+10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst
+10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check
+10-01-01 make.probe: handle ['"] in CC.VERSION.STRING
+09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS
+09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
+09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
+09-11-11 package.sh: re-order and combine cc checks
+09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
+09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
+09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
+09-10-06 package.sh: stub in ar intercept checks -- not used yet
+09-10-06 ar.ibm.risc: add ar intercept because some aix require -Xfoo first!!
+09-09-24 regress.sh: fix UMASK logic to create test support files before umask
+09-08-28 release.c: change docs to mention stdin if no file operands
+09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space
+09-08-20 make.probe: add CC.SHARED.NAME
+09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO }
+09-08-11 package.sh: filter lines containing : for package results
+09-07-31 make.probe: add CC.AR.ARFLAGS (for aix ar -xany)
+09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options
+09-06-24 package.sh: fix admin.db output formatting
+09-05-05 package.sh: export dll hackery environment vars
+09-05-05 package.sh: handle non-identifier hostnames
+09-05-05 mamake.c: pass undefined ${...} identifiers to the shell
+09-05-05 mamake.rt: add macro expansion regression tests
+09-05-01 iffe.sh: fix output initialization *again*
+09-04-28 package.sh: handle admin.db contact field $9
+09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops
+09-03-31 regress.sh: EXPORT before test => global ENVIRON[]
+09-03-26 package.sh: test fail pattern is 'fail[es]'
+09-03-26 UNIT - ... appends (options) to command line
+09-03-19 TEST.mk: x.tst => x only if x is command target
+09-03-15 regress.sh: add ${MAIN} for base name of main unit
+09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir
+09-03-03 regress.sh: allow command line unit to override UNIT
+09-03-03 mktest.sh: handle IO == $'\n'
+09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs
+09-01-30 cc.mvs.390: c89 balks at [ ()] in -Dname="..."!
+09-01-27 package.sh: add isascii() to use ratz instead of tar
+09-01-20 hurl.sh: add --size=bytes option
+09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding
+09-01-03 regress.sh: fix UNIT to allow command line override
+09-01-03 mktest.sh: handle TWD
+08-12-24 package.sh: fix cross-compile HOSTTYPE logic
+08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 }
+08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!!
+08-09-30 rt.sh: fix ksh93 regression test signal count
+08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input
+08-09-24 package.sh: package only test foo => make --recurse=only recurse tests foo
+08-09-20 make.probe: handle another /usr/bin/file shared lib description
+08-09-20 regress.sh: add --pipefail for SET pipe-input ...
+08-09-17 Makefile: add gdbm1.c for <gdbm-ndbm.h>
+08-09-10 make.probe: add CC.NOPROTECT
+08-08-08 mktest.sh: add --width=width
+08-08-05 dbm.req: favor sleepycat ndbm compatibility
+08-08-04 C+probe: fix stdlib initialization logic
+08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo
+08-06-20 TEST.mk: make the localyunit before *.rt => *.tst -- doh
+08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2
+08-06-11 regress.sh: fix bug that skipped the last test
+08-05-20 regress.sh: add --local to put *.tmp dir in local fs
+08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI
+08-05-01 package.sh: package test => ulimit -c 0
+08-04-28 regress.sh: fix EXPORT quoting
+08-04-28 regress.sh: fix UNIT set check args too
+08-04-24 rt.sh: exit code > 256 => signal termination
+08-04-10 C+probe: change probe_so order to check .so last (macos ld workaround)
+08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST
+08-03-28 C+probe: add C++ #include <iostream> (no extension) dir probes
+08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally
+08-02-28 make.probe: fix probe_warn to include ld!
+08-02-02 make.probe: add CC.RUNPATH to match default -L order
+08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH
+08-01-31 iffe.sh: tweak ancient /bin/sh workarounds
+08-01-28 make.probe: darwin ld export dynamic is -force_flat_namespace
+08-01-28 C+probe: handle sgi cc error message but exit 0 botch(es)
+08-01-23 package.sh: fix checksum doc typo
+08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list
+07-12-14 iffe.sh: add set nooptimize
+07-12-03 package.sh: add LC_ALL=C
+07-11-27 package.sh: fix overaggressive *.md5 cleanup
+07-11-20 iffe.sh: treat exit status >= 250 as normal error with no signal
+07-11-05 package.sh: fix write op error count pattern
+07-11-05 package.mk: fix $(~req) .ver binding
+07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION[.STRING]
+07-08-01 package.sh: handle 'package read lcl|tgz'
+07-05-08 regress.sh: execute basename instead of absolute path for short $0
+07-04-27 cc.sgi.mips[34]: for #error to exit non-zero -- a no brainer
+07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh
+07-04-11 mamprobe.sh: handle $(CC.*) => ${mam_cc_*}, $(...) => ${...}
+07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG
+07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe
+07-03-28 package.sh: fix binary tgz architecture type duplication
+07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst
+07-03-28 iffe.sh: add -F header to mac test
+07-03-23 make.probe: handle file(1) that returns 'archive' for .so
+07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF
+07-03-11 package.sh: add nocopyright and tst => nocopyright
+07-03-11 package.mk: add copyright=0
+07-03-08 C+probe: restore IFS after probe.ini
+07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR}
+07-01-05 package.sh: fix "admin write binary" logic
+07-01-01 iffe.sh: add "cmd" --verbose trace
+07-01-01 iffe.sh: sort => LC_ALL=C sort
+07-01-01 C+probe: LC_ALL=C
+06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local!
+06-11-23 package.sh: *.md5 are not tarballs -- doh
+06-11-23 iffe.sh: add -F, --features=feature-test-header
+06-11-11 make.probe: favor lib64 over lib for hosttype==*64
+06-10-31 make.probe: add "-ignore-source-dir -iquote" test
+06-10-31 iffe.sh: add status{...} code block
+06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?)
+06-10-11 package.sh: handle already gunzip'd *.tgz
+06-10-06 iffe.sh: add reference for header content tests
+06-09-27 regress.sh: fix UMASK to do DO too (duh)
+06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics)
+06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together
+06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too
+06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io
+06-09-05 C+probe: add { probe_version version_stamp version_string }
+06-09-05 make.probe: add version stamp comment, CC.VERSION[.STRING]
+06-08-27 regress.sh,mktest.sh: add UMASK
+06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE
+06-08-25 mktest.sh: add IGNORESPACE
+06-08-24 mktest.sh: handle \000 in data
+06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR
+06-08-16 package.sh: fix 'install flat' logic
+06-08-11 rt.sh: handle style=shell %K date format
+06-07-17 ratz.c: fix __MVS__ FAR definition
+06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe
+06-07-17 package.sh: differentiate urls vs. assignments
+06-06-27 rt.sh: add --failed, --heading
+06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0'
+06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance
+06-06-25 mktest.sh: implement PROG
+06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk
+06-05-06 package.sh: add PACKAGE_admin_tail_timeout
+06-05-22 ratz.c: upgrade to zlib-1.2.3
+06-05-09 package.sh: fix admin.db docs
+06-03-11 package.sh: fix `package use - command ...'
+06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.`
+06-02-14 package.sh: "results failed test" == "results test failed"
+	 cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0
+	 cc.linux.ia64-icc: add for intel cc
+06-02-02 package.sh: freebsd stuck with os version for all arch
+06-02-01 package.mk: fix locale logic (tw -d requires dir arg)
+06-01-31 package.sh: require $CC only for make|test
+06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd
+	 package.sh: add more pdksh => /bin/sh checks
+06-01-26 package.sh: wget --http-pass => --http-password
+	 package.sh: fix wget error logic
+	 hurl.sh: wget --http-pass => --http-password
+06-01-11 package.mk: pass package.license.class to make --mam too
+	 package.mk: variants=pattern => --variants=pattern
+	 package.sh: darwin rel<=7 => darwin7.ppc
+	 package.sh: freebsd rel<=4 => freebsd4
+	 package.sh: freebsd rel<=5 => freebsd5
+05-12-07 iffe.sh: don't emit <stdio.h> if <sfio.h>|<ast.h> (XXX)
+05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0
+05-09-22 mktest.sh: add EXEC [ ++NOOUTPUT ++NOERROR ++NOEXIT ]
+05-09-21 mktest.sh: fix --style=shell compare to ignore \r
+05-09-12 TEST.mk: all --force to force %.rt regeneration
+05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst
+05-08-25 mktest.sh: add
+	 TEST.mk: add %.rt=>%.tst for mktest
+05-08-18 package.sh: 'package host cpu' now checks $NPROC first
+05-07-17 iffe.sh: add { define extern include print } ops
+	 iffe.sh: accept output{...}end output on success only -- doh
+05-07-01 package.sh: add TARPROBE for tar B flag probe
+05-06-24 package.sh: fix binary read chmod via *.sum
+05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types
+05-06-01 make.probe: verify that cc_pic works for hosted cc
+	 cc.lynxos.ppc: make -mshared the default
+	 package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation
+05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT
+05-05-24 iffe.sh: really fix grouping logic -- with tests this time
+	 package.sh: pipe/socket configuration mismatches => use /bin/sh
+05-04-28 TEST.mk: add $(TESTS)
+05-04-19 package.sh: package results test uses rt if possible
+	 iffe.sh: fix 'op var - ... - ...' grouping logic
+05-04-15 rt.sh: handle autom4ate style
+05-04-11 regress.sh: fix unit name when command line unit also specified
+	 rt.sh: handle all ast package test output formats
+	 package.sh: fix make docs for options passed to underlying make
+05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime
+	 regress.sh: add "TITLE name" to change TEST output title
+05-04-01 rt.sh: add pretty make test + regress.sh wrapper
+05-03-29 package.sh: test -e path => test -f path -o -d path
+05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh
+05-03-19 mamake.c: command line name=var also defines name.FORCE=var
+05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd
+	 package.sh: old make.out saved in circular make.out.[1-9]
+	 mamake.c: sync with nmake :W=O:
+05-03-01 package.sh: fix flat hierarchy initialization
+	 package.sh: admin action now properly resets sibling remote logs
+	 package.mk: relax unknown/unwritten package messages to warnings
+	 package.sh: handle space in command line name=value
+	 make.probe: add mvs -Wc,dll,exportall,longname,rent to CC.DLL probe
+05-02-24 package.sh: hosttype *.powerpc => *.ppc
+	 cc.lynxos.ppc,ldd.lynxos.ppc: add
+05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug
+05-02-20 probe.win32: handle /platformsdk mount
+05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir
+05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 -
+05-02-14 package.sh: handle multiple architectures per host in admin.db
+	 Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides
+	 package.sh: normalize trailing [-_]bits in host type
+	 iffe.sh: some ksh-compatible shells don't do *(pattern)
+05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack
+	 cc.lynxos.i386: -dynamic instead of -static default
+05-02-10 package.sh: cyg usr/doc => usr/share/doc
+05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08
+	 iffe.sh: work around old bash 0<... redirection bug
+05-02-06 package.mk: source.tgz: update generated files only when they change
+05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow
+05-01-11 package.sh: update setup docs to include authorize+password
+	 package.mk: fix .source.cyg final directory edit
+	 package.mk: notice=1 for conspicuous empty NOTICE file
+	 WWW.mk: fix *-index.html installation
+	 filter.sh: retain input file suffix in tmp copy
+	 mamexec.c: fix non-contiguous "exec" bug that skipped lines
+	 iffe.sh: fix candidate lib test to try grouping subsequent libs
+	 iffe.sh: fix child process stdin hijack that skipped input lines
+	 iffe.sh: --shell=osh to force read -r compatibility command
+	 iffe.sh: chop iffe input leading space before # for KnR compatibility
+05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes
+	 mamake.c: fix makefile scan to ignore lib*.[hH]
+	 iffe.sh: immunize function/symbol tests from aggressive -O
+04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator
+04-12-21 ratz.c: make sure tmp dir is writable -- doh
+04-12-08 iffe.sh: fix dat test for aggressive -O
+04-12-01 iffe.sh: add `include file' to pull in #define's for `exp'
+04-11-11 package.sh: default MAKESKIP is "*[-.]*"
+04-10-22 ratz.c: change docs to note zlib license
+	 mamake.c: handle --debug-symbols and --strip-symbols
+	 package.sh: make (debug|strip)=1 => --(debug|strip)-symbols
+	 package.mk: add :LICENSE: => package.license.class
+	 mamake.c: fix recursive order logic
+04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs
+04-10-11 package.sh: add 'authorize name' and 'password password'
+04-10-01 iffe.sh: double check $static link with ! $static
+	 Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+	 make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL}
+	 package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+04-09-21 package.mk: $(init)$(name) is now an implicit prereq
+04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok
+04-09-01 package.mk,package.sh: rename *.txt => *.README
+	 package.mk: add the runtime package type (no *.[ah])
+	 iffe.sh: fix key test reports
+04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp[l] ldexp[l] }
+04-08-11 package.mk: handle HOSTTYPE for solaris > 9
+	 package.sh: add `checkaout proto' for { make view }
+	 package.sh: check for { md5sum md5 }
+	 iffe.sh: add {if|elif|else|endif} test ...
+	 iffe.sh: add 'exp - expression' and '( expression )'
+	 iffe.sh: add 'name = test ...' user defined macros
+	 iffe.sh: add '! test ...' negation
+	 TEST.mk: add implied { .c .sh } generated prereq
+	 cc.darwin.ppc: handle 10.3 -dylib mess
+04-08-01 package.mk: let include handle nested requirements -- duh
+04-07-31 package.sh: attempt a second ping before admin assumes host down
+04-07-26 package.sh: fix hp.ia64 HOSTTYPE
+04-07-23 probe.win32: generalize #include dir order search
+04-07-17 regress.sh: add INPUT -x for chmod +x
+04-07-01 regress.sh: TMP => TWD
+04-06-29 regress.sh: put COMMAND in $TWD too
+04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs
+	 TEST.mk: add :TEST: -- to disable .c .sh search
+04-06-18 TEST.mk: add .SCAN.tst
+04-06-17 regress.sh: TEST returns true if active, false otherwise
+	 regress.sh: add CD to change test pwd from $TWD
+04-06-16 regress.sh: add TWD for ./unit.tmp override
+	 regress.sh: DO now flushes previous test
+	 regress.sh: INPUT and OUTPUT handle -f for printf instead of print
+04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH
+	 package.sh: skip nmake if older than 2000-10-31
+04-05-20 package.sh: fix arg vs. package parse with - or '' to disambuguate
+04-05-11 package.sh: package verbose update lists closure for package setup
+	 package.sh: add src/lib/libardir to nmake proto bootstrap
+	 regress.sh: probe for rm -u vs. chmod -R u+rwx
+04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH
+04-04-15 make.probe: check probe_libdir false positives
+	 package.sh: add lib/package/*.lic src package subdirs
+	 package.mk: add mamfile=0 to inhibit Mamfile generation
+	 iffe.sh: config name_DECLARED => HAVE_name_DECL
+	 iffe.sh: fix mac to handle default value
+04-04-11 iffe.sh: normalize sed [\\\\/] quoting
+04-04-04 package.mk: only checksum generated tarballs
+	 mamprobe.sh: add STDCHMOD
+04-04-01 C+probe: set export LANG=C for uniform error messages
+	 make.probe: another CC.STDLIB tweak
+	 package.sh: fix regress core dump pattern, expand [a-z] match ranges
+04-03-31 Makefile: add intl :MAPLIB: test
+	 make.probe: fix CC.STDLIB search; drop CC.* path duplicates
+04-03-28 iffe.sh: drop unused exec $stdin<&0 dup
+04-03-25 Makefile: add iconv :MAPLIB:
+	 package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override
+04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: update base change on md5 sum instead of size
+	 iffe.sh: adjust case label \ and keyword quoting for ancient /bin/sh
+04-03-22 probe.win32: ncc => nld
+04-03-19 CONVERT.mk: change the instructions and old source dir default
+	 package.mk: fix recurse=list check
+	 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: fix update base/delta/sync existence check
+04-03-18 iffe.sh: -d2 does not remove core dumps on exit
+04-03-17 package.sh: fix make recurse arg/action order
+04-02-29 package.sh: add regress action to compare current and previous tests
+	 package.sh: fix sgi.mips[23] HOSTTYPE test for old irix cc
+	 package.sh: add `export variable ...'
+	 package.sh: admin action now handles host name with non-id chars
+	 package.sh: non-numeric M T W in admin.db disables that action
+	 package.sh: fix admin write binary local vs. shared clash
+	 cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable
+	 cc.hp.pa64: sync with cc.hp.pa
+	 cc.ibm.risc: -bnolibpath => -blibpath:/usr/lib:/lib
+	 probe.win32: sync with make.probe
+	 make.probe: fix last chance dynamic test
+	 make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E
+	 make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall
+	 make.probe: move probe_dll_def to the end of probe_dll
+	 package.mk: capture subcomponent mamfile recursion
+04-02-24 make.probe: strip "..." from cc/ld traces
+	 iffe.sh: add ``set [no]define'' to disable macro #define/#undef
+04-02-23 make.probe: rework CC.LD search
+04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export
+	 make.probe: resurrect CC.PIC with separate semantics from CC.DLL
+	 make.probe: add CC.SHARED.LD for CC.SHARED linker
+	 C+probe: clear DISPLAY to stifle interactive windows
+04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end
+	 make.probe: add { CC.AR CC.SIZE }, fix cross command search
+	 cc.darwin.ppc: change $cc => $CC for old ksh + libast conf bug
+04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++
+04-02-04 package.sh: fix cross compilation bug that mixed binary formats
+04-02-02 package.sh: package admin now ditto's bin/package too
+04-01-30 cc.sgi.mips3: drop warning 3421
+04-01-11 regress.sh: output label#count for tests in loops
+04-01-05 regress.sh: fix bug that ignored the first SAME
+04-01-04 crossexec.sh: fix typo that did not recognize rcp
+03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse()
+03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency
+03-09-23 ratz.c: fix tar header number parse bug that skipped to next number
+	 regress.sh: rm cleanup now handles files matching -*
+03-09-11 iffe.sh: add unnamed { ... } blocks
+	 regress.sh: add COPY from to, like MOVE but comprison still done
+	 regress.sh: rm -rfu to handle test dirs w/o u+rwx
+03-08-14 Makefile: add hello.c to the manifest
+03-08-11 package.sh: fix `html binary' generation
+03-06-21 package.sh: fix INITROOT initialization bug
+	 package.sh: make sure admin logs exists before tail'ing
+03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
+	 cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
+	 package.sh: fix onpath function global var conflict
+	 make.probe: add CC.DIALECT { GNU -dD }
+	 package.mk: add Mamfile to lcl manifest
+03-06-10 package.sh: fix setup action typo that only checked the INIT package
+	 package.sh: *.s390x => *.s390-64
+03-06-09 package.mk: add cyg :POSTINSTALL:
+03-06-08 make.probe: fix CC.STDLIB logic
+	 hurl.sh: add User-Agent identification
+	 package.sh: tweak source and binary installation instructions
+	 cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths
+	 ldd.hp.pa: add
+03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check
+	 make.probe: add CC.STDLIB verification
+03-06-04 make.probe: add +forceread +noforceread
+03-05-11 hurl.sh: handle http://host:port/path
+03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic
+03-05-05 package.mk: fix cygwin tarball names
+03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile
+03-04-27 make.probe: fix mvs CC.PREFIX.SHARED "lib" => ""
+	 make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR)
+	 make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD }
+	 probe.win32: sync with latest CC.*
+03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh
+03-04-23 package.mk: fix dup "covered by" licenses
+03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's
+	 package.sh: fix admin write binary tarball snarf
+03-04-21 package.mk: package covered *.@(pkg|lic) too
+03-04-15 package.mk: don't generate incremental archives for lcl
+	 package.mk: add incremental=[source:1 binary:0] archive control
+	 package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc
+	 package.sh: admin must ditto lib/package/*.@(pkg|lic) too
+	 mamake.c: ignore time of ignore prereqs
+	 mamake.c: -D2 lists propagated times
+03-04-11 package.mk: tidy up cyg tarballs
+	 package.sh: fix old shell clash between get() and $get
+03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions
+	 package.sh: add pthread_num_processors_np() last resort for cpu count
+	 package.sh: use `make believe' to accept mamake generated files
+	 package.sh: handle `make [make-flags] [target ...]'
+	 mamake.c: ignore -e
+03-03-21 package.mk: fix cyg old make typo
+	 package.sh: switch to `package setup' instructions
+03-03-19 package.sh: add registry checks for `host cpu'
+	 package.sh: `results failed' now lists core dump messages
+03-03-17 package.sh: on cygwin verify 'ntsec binmode' in $CYGWIN or die
+	 Makefile: install gcc wrapper if no cc
+	 package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops
+03-03-12 package.mk: add :DETAILS: for style-specific details
+03-03-11 package.sh: add beta setup/update support
+	 TEST.mk: add (TESTCC) prereq for .sh tests
+03-03-07 hurl.sh: add
+03-03-06 iffe.sh: fix lib win32 test cygwin vs native incompatibility
+	 iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro
+03-03-03 package.sh: check for curl or wget for update
+	 package.sh: add setup action == update read make
+	 package.sh: fix packageroot() typo that showed up in non ~user shells
+	 mamake.c: treat name+=value args like name=value
+	 mamake.c: add ${var?*|value?match?no-match?}
+	 mamake.c: fix archive vs. dynamic bind logic
+03-02-28 package.sh: add the "cyg" (cygwin) package type
+	 package.mk: add "cyg" stubs, :CATEGORY: for category name(s)
+03-02-25 mamake.c: add -D4 system(3) debug trace
+03-02-24 package.mk: change --mismatch to --corrupt=accept
+03-02-14 ratz.c: add _WIN32 setmode([01],O_BINARY) and fopen "rb"/"wb"
+03-02-12 Makefile: handle getconf LIBPATH with host pattern
+03-01-31 package.mk: fix .lic search
+03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere
+	 package.sh: admin handles command outside of $PACKAGEROOT/bin
+	 Makefile: install $(INSTALLROOT)/lib/make/package.mk
+03-01-28 package.sh: admin remote commands on one line to please syslog
+03-01-23 probe.win32: borland and mingw32 tweaks
+03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh
+03-01-16 ditto.sh: tw --chop on by default
+03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/
+	 package.sh: admin now initiates remote exec and copy from local host
+03-01-12 package.sh: handle admin "xxx:" default root
+03-01-03 probe.win32: add /usr/include/borland path truncation workaround
+02-12-10 iffe.sh: add <&$nullin >&$nullout to checkread() $cc
+02-12-06 probe.win32: fix inlcude => include typo, add lcc lib
+	 probe.win32: CC.MAKE.OPTIONS = nativepp=0
+02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined
+02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks
+02-11-26 package.sh: package release now checks for second level files
+02-11-22 package.sh: update action now uses HTTP/1.0
+02-11-21 probe.win32: update the vc include dir test
+02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var
+02-11-13 packahe.mk: fix list.install => list.installed typo
+02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search
+	 make.probe: add CC.LD.STRIP for link time a.out strip
+	 package.sh: fix package_use vs. PACKAGE_USE check
+02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post
+02-10-23 mamake.c: fix unuinitialized time in make()
+	 ratz.c: fix meter buffer overflow
+02-10-20 package.sh: fix lib/probe/C/make/probe update test
+02-10-18 probe.win32: update for mingw
+	 make.probe: add bash workaround to SHELLMAGIC test
+	 package.sh: work around yet another cygwin hassle
+02-10-17 iffe.sh: short circuit id check for *[-+/\\]*
+02-10-08 regress.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: $CC must at least compile and executable hello world
+02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=>$PACKAGEROOT/lib/package/tgz
+	 package.mk: $(ED) => $(STDED), $(EDFLAGS) => $(STDEDFLAGS)
+	 iffe.sh: add identifier checks for tests that (implicitly) require them
+	 iffe.sh: disambiguate a few --config macros
+02-10-02 iffe.sh: fix shell=bsh `hdr a/b'
+02-09-30 package.sh: handle chmod of -* files
+	 package.sh: verify that $SHELL is Bourne compatible
+	 package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation
+	 iffe.sh: fix bug that didn't define mac variable on success
+02-09-22 package.sh: handle admin_action=ditto
+	 iffe.sh: --config sizeof(foo) macro is SIZEOF_foo
+	 iffe.sh: fix long.long test so it doesn't defeat uwin "typ long.long"
+	 mamprobe.sh: convert $("foo") nmake string constants
+02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout
+02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
+	 mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
+	 mamake.c: pass cc absolute path to mamprobe
+	 package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
+	 iffe.sh: lcl,nxt: drop default sys/ check
+	 ditto.sh: tw --logical by default; add --physical
+02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
+02-09-09 ditto.sh: test that remote .profile exists before sourcing
+02-09-06 package.sh: don't ditto nfs junk
+	 ditto.sh: --show now lists directory ops instead of enumerating all
+02-09-05 ditto.sh: add --remote={rsh|ssh}
+	 package.sh: add admin [[{rsh|ssh|-}]:]directory
+02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility
+02-09-01 cc.unix.mc68k: add for ancient 3b1
+02-08-22 package.sh: fix component() to test for components -- duh
+	 Makefile: add LICENSE:.DONTCARE to workaround mam
+02-08-11 iffe.sh: provide defaults for LD_* additions
+02-08-07 ratz.c: change -m to use * instead of non-portable inverse video
+02-07-17 mamprobe.sh: close tmp file in trap before rm for cygwin
+	 package.sh: fix "type" to handle i1586 (P4)
+	 package.sh: add the view action
+02-06-28 package.sh: handle multiple packages for release action
+02-06-27 package.sh: catch sol*.sparc=>sol*.sun4 when CC=gcc
+02-06-14 package.sh: fix admin_action to not include qualifiers
+	 package.sh: fix help/html doc typo
+02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*'
+02-06-07 WWW.mk: change substitute $("\n") to \n
+02-06-06 package.sh: clarify output streams for help/html
+02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH)
+02-04-04 package.sh: fix update to differentiate *.sun4 and sun4
+02-03-27 package.sh: yacc/bison warning only if both missing
+02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems
+02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package
+	 package.sh: precheck $CC, not `cc'
+	 package.sh: fix install to use pax -ps to preserve set-uid/gid
+	 package.sh: fix install to use list.installed for existing files only
+02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read
+	 package.sh: fix update delta sync fetch
+02-02-14 iffe.sh: fix macro{ }end docs to include "
+	 iffe.sh: add dfn to extract #define from headers
+	 iffe.sh: handle nxt #include ok but no line sync
+	 iffe.sh: drop local header clash logic
+	 iffe.sh: add -X, --exclude=dir to exclude -I dirs
+	 iffe.sh: lcl,nxt now generate <...> headers instead of "..."
+	 package.sh: admin.db root dir matching -* disables host
+	 package.mk: fix package.src.pat typo -- too many )
+	 package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 Makefile: move proto.c generation to the proto component dir
+02-02-02 execrate.sh: add for .exe challenged win32 systems/commands
+	 mamprobe.sh: add STD* commands/flags
+	 mamake.c: update mamprobe info when older than mamprobe executable
+	 package.sh: move ed/ex workaround to mamprobe.sh
+	 package.sh: fix `host type' bug that incorrectly assumed sun4 for sol
+	 package.sh: add execrate(1) hooks for challenged systems
+	 package.sh: add check for { cc ar nm yacc/bison } before make
+	 ratz.c: fix "rb" vs. "r" macro tests
+	 iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include
+	 iffe.sh,package.sh: remove vaibale from sccs,cvs ident strings -- duh
+02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B*
+	 iffe.sh: handle 'mem struct.a.b'
+02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results
+	 package.sh: uts.370 => uts.390
+02-01-18 package.sh: fix uts hosttype
+02-01-17 package.sh: add 'results failed ...' to list failures only
+	 package.sh: change ARCH internal var to all_types to avoid env conflict
+	 iffe.sh: fix hdr/lib precheck that missed some -- ouch
+	 iffe.sh: fix noexecute test that forgot to check compile first!
+02-01-15 ratz.c: fix path[] type typo
+02-01-01 package.mk: tighten license search
+02-01-08 package.sh: `pwd` => ${PWD:-`pwd`}
+	 package.mk: expand license file pattern match
+02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value"
+	 iffe.sh: fix initial <sys/types.h> check to honor --config
+01-12-25 iffe.sh: fix bug where -o file restored old file
+01-12-23 package.mk: uniq the closure lists
+01-12-07 ratz.c: fix --meter to retain paths containing " -- "
+01-11-30 ratz.c: use sear_system() to execute; should work on all windows
+01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status
+01-11-26 ditto.sh: drop n+=v for ksh compatibility
+01-11-21 ditto.sh: add rsync script replacement [hey, it works!]
+	 package.sh: add [ditto]:directory notation to admin.db
+01-10-31 package.sh: handle *.sum paths with embedded space
+	 package.sh: change executable() to onpath()
+	 package.sh: executable([!] foo) replaces test [!] -x foo (.exe hack)
+	 package.sh: add os2 fix to `host type'
+	 mamake.c: add .exe hack
+	 iffe.sh: fix intrinsic function lib test
+	 mamprobe.sh: update pic probe to match make.probe for linux.ia64
+01-10-30 package.sh: make action skeleton view now checks subdirs
+01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP
+	 package.mk: tarball package.notice replaces `license accepted' prompt
+	 package.sh: eliminate `license accepted' prompt
+	 package.sh: add update to download latest from a url
+	 package.sh: use builtin arithmetic when we know it's ksh
+	 iffe.sh: unkown -> unknown
+01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
+	 package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
+	 ratz.c: fix -m for paths containing \f\n\r\v
+01-10-16 ratz.c: _SEA_* => SEAR_*
+	 ratz.c: preserve stdin for sear_exec()
+	 ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup
+01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC
+	 package.sh: add nfs wakeup call to admin to avoid stale file handles
+01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh)
+01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH
+	 package read: save cpy of bin/package when reading the INIT package
+	 mamprobe.sh: allow cc path with optional arguments
+01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization
+01-09-19 package.mk: add recurse to list.package.*
+	 package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32
+01-09-11 ratz.c: add _SEA_SKIP & _SEA_COMMAND for self extracting archives
+01-09-07 package.mk: fix output capture to not generate files names with spaces
+01-09-07 package.mk: fix delta release number search
+01-08-11 package.mk: handle single gz executable packages (e.g., for ksh)
+	 package.sh: fix package install to require nmake only if no *.sum
+	 iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash
+01-07-17 package: fix use cross compile test to generate files in /tmp
+01-06-27 ratz: handle hard and soft links if possible
+01-06-07 Makefile: fix :MAPLIB: for sco
+01-05-31 crossexec.sh: add
+	 iffe.sh: add -x crosstype to run crossexec
+	 iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end
+	 package.sh: add package host canon external-host-type-name
+	 package.sh: fix `use USER' lookup for shells that support ~USER
+	 cc.*: add -dumpmachine to dump target HOSTTYPE
+01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops
+01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command
+01-04-26 *.sh: expand [a-z][A-Z][0-9] for non-contiguous character codes
+	 iffe.sh: fix run *.sh for shells that don't $* across . command
+	 cc.mvs.390: recode for /bin/sh
+01-04-25 package.mk: include non cc-g variants by default
+	 package.sh: *[._]* => *?[_.]* for mvs.390 /bin/sh
+01-04-24 TEST.mk: no tests for VARIANT=="DLL"
+01-04-22 package.mk,package.sh: tarball text members are ascii encoded
+01-04-18 package.mk: allow package name to be the same as one of its components
+         cc.mvs.390: handle .C .cpp .cxx
+         cc.mvs.390: compensate for -o that does not overwrite
+01-04-01 regress: fix SAME that just skipped it -- we should regress regress!
+	 iffe: fix bug that didn't emit _hdr_foo for internal hdr tests
+	 iffe: fix lcl bug for cc -E that doesn't emit line syncs
+	 ratz: add ascii=>ebcdic conversion for text archive members
+	 mamake: fix buffer overlap bug that clobbered the probe file path
+01-03-17 iffe: handle : separator as first arg
+01-03-15 mamake.c,ratz.c,release.c: add <stdlib.h> and <string.h>
+01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
+01-02-22 cc.ibm.risc: handle SF_CLOSE clash in <sfio.h>
+01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
+	 C+probe: quote "$cc" when it's an argument!
+	 mamake: execute actions with $SHELL, ignored signals back to default
+	 package.sh: nmake check error output to /dev/null
+	 package.sh: fix INIT a.out updates for knr cc
+	 package.sh: package list now handles large tgz dirs
+	 package.sh: *-ok executables moved to ok/* for *.dll systems
+	 iffe.sh: change "exec >&-" to "exec >/dev/null" else linux mkdir fails!
+	 mamake: handle `bind -lx [dontcare]'
+01-02-12 ratz.c: fix _PACKAGE_ast includes
+	 package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/
+	 package.sh: $CC ^HOSTTYPE=[A-Za-z_0-9.]*$ overrides HOSTTYPE
+	 iffe.sh: fix dat code that used previous $tmp.exe
+	 iffe.sh: fix dat code for _DLL imports
+01-02-09 iffe.sh: add copy() for shells with the disappearing here doc bug
+01-02-08 Makefile: guard against null $(CC.HOSTTYPE)
+01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged)
+01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE
+	 package.sh: create intermediate recursion makefiles when needed
+	 package.sh: add $SECONDS to the DEBUG trace prompt
+01-01-01 ratz.c: #ifdef for uwin ncc
+	 iffe.sh,package.sh: check PACKAGE_PATH for local installations
+	 package.sh: add psrinfo for osf.alpha host cpu
+	 package.sh: change pax --meter probe; some hang on /dev/tty
+	 package.sh: fix `install flat ARCH'
+	 mamake: eliminate loops from scan order
+	 C+probe: add probe_verbose -V for aix cc=xlc
+	 cc.ibm.risc,ldd.ibm.risc: add
+	 package.mk: list refs to top-level licenses only
+	 package.mk: add local link table to change log html
+00-12-25 package.sh: `no package archives' is a hard error, duh
+	 package.sh: reorder host type logic for lame shells
+	 mamake.c: getcwd => getwd for NeXT -- how about posix==default guys
+	 iffe.sh: really gross workaround for NeXT -lposix stdout null's
+	 iffe.sh: handle cc -E that insists on compiling
+00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0
+	 *.sh: `getopts 2>/dev/null` => `(getopts)2>/dev/null` for ancient sh
+	 package.sh: fix LD_LIBRARY*_PATH initialization
+	 cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms
+00-12-12 ratz: add --meter
+	 package.sh: a few VPATH fixes
+	 Makefile: don't override *.mips* cc if -version not accepted
+00-12-11 package.mk: *.inx now contains name=value
+00-12-07 package.sh: handle PC netscape . => _ pathname mangle
+	 WWW.mk: .tar.gz => .tgz
+00-11-27 package.sh: add checklicense() to do license checks at read time
+	 package.mk: change component list from preformat to table
+00-10-31 package.mk: *.pkg must assert closure
+	 package.mk: add cc- variants to list.package.binary
+	 package.sh: omit dups from package list
+	 package.sh: invalid arg gives one line Usage
+	 package.sh: relax checkaout checks for non-owners
+	 package.sh: package use sets NPROC if not already set or [01]
+	 proto.c: add $(INSTALLROOT)/include/ast hack
+00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE:
+00-10-25 package: fix install
+	 package.mk: add list.install
+00-10-22 regress: fix VIEW to skip empty dirs
+00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake => $(PACKAGEROOT)/bin/manmake
+	 iffe: validate #define identifiers
+00-10-18 C+probe: mac os10 additions
+	 package: add DYLD_LIBRARY_PATH initialization
+	 add ldd.$(CC.HOSTTYPE)
+00-10-01 iffe: handle -I* -L* options
+00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs
+00-09-19 C+probe: add probe_longlong
+00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake
+00-09-08 iffe: verify that $cc is a C compiler
+00-06-14 mamprobe: fix win32.* probe
+	 mamake: fix bug that used lower view path for generation
+	 package: don't clobber $PACKAGEROOT/bin/nmake
+00-06-01 C+probe: fix stdinclude *again*
+	 package: fix write delta source to use default pax format
+	 package: add disambiguating bias for sgi.mips3 over sgi.mips4
+	 package.mk: fix for directory content packages lib ast-locale
+00-05-01 iffe: fix invalid _LIB_ macro identifier
+00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude
+00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected
+00-03-17 package: all archives are .tgz for binary download
+	 package: $(PACKAGEROOT)/LICENSES/* in source and binary archives
+	 package: implement install and verify actions
+	 iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb
+	 iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk
+	 package.mk: add *.pkg :INDEX:
+00-03-07 package: add admin action
+00-03-06 makefile: install optional make probe override script C+make+probe.lcl
+00-02-14 --- release 1.0 ---
+	 ratz: treat "foo/" as a dir, not a regular file
+	 package: clarify source and binary installation instructions
+	 package: fix so binary packages can install without cc
+	 package: "ratz" now a non-archive package (the only one) for bootstrap
+	 package: handle VPATH=a:b arg
+	 package.mk: "ratz" package adjustments
+	 Makefile: use :PACKAGE_INIT: to support binary INIT packages
+	 WWW.mk: add :WWWALL:
+	 C.probe: fix .so check that let .dll slip through
+	 iffe: fix config sh var assignment for HAVE_member_IN_struct
+	 iffe: fix config sh var assignment for symbol_DECLARED
+	 package: delay PATH export until dll hack exports complete
+	 package: don't forget binary package $(INSTALLROOT)/lib(32|64)
+	 package: add delta change log for source packages
+00-02-10 mamprobe: add mam_cc_DLLBIG
+	 package: fix spelling typos
+	 package: add html help output
+	 package.mk: beef up source and binary help => html
+00-02-08 package: mkdir man/man[138] in the new arch to cover MAM bug
+00-01-28 package,release: add -rcount to release
+	 package: fix linux "host cpu" and "host rating"
+	 package: copy *.lic to $PACKAGEBIN for "make" and "write binary"
+	 package: fix 'release change log' case match
+00-01-24 package: add copyright action
+	 mamprobe: add -D_BLD_DLL to mam_cc_DLL
+00-01-11 package: tsort for package write
+	 package: early verification that $CC works
+	 package: add non-interactive command arg for use action
+	 proto: fix -C intermediate mkdir()
+	 mamprobe: unixware.i386 ksh workaround
+	 C.probe: move hosttype to C.probe (with unixware.i386 workaround)
+	 WWW.mk: fix mm2html option quoting
+	 WWW.mk: add .SCAN.mm
+	 WWW.mk: don't force static=1; grab dll's instead
+	 *.sh: fix getopts test to handle botched implementations like osf.alpha
+	 iffe.sh: fix read -r test
+99-12-25 iffe: tweak verbose messages
+	 iffe: hand code non-optget getopts parse
+	 iffe: fix bash quoting bug again
+	 iffe: do test -w . after option parse
+	 package: fix PACKAGEROOT search
+99-11-19 --- release 0.2 ---
+99-11-19 first working package & friends
+99-10-31 change from lib0ast to INIT; add MAM and package bootstrap
+	 hostinfo: gobbled by package
+99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround
+99-09-27 iffe: add --all --verbose, --* set options
+99-09-22 regress: -v disables long line truncation
+99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME)
+99-08-11 hostinfo: fix type sgi.mips4
+99-06-24 WWW.mk: add
+99-06-08 hostinfo.sh: ${TMPDIR:-/tmp}
+99-06-07 TEST.mk: add
+99-06-01 iffe: add `siz type' for _siz_type == sizeof(type)
+99-05-11 hostinfo,iffe,regress,use: long options
+99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine
+99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks
+	 iffe: check that . is writable
+99-03-17 hostinfo: fix for cc not found
+	 dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE
+	 C.probe: extra check for include dirs pulled in by <sys/types.h>
+99-03-03 regress: add `UNIT - ...' for extra args
+	 Makefile: add (_hosttype_) prereq for cc
+99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there
+99-01-11 C.probe: shlib before lib, /usr before /
+98-12-25 iffe: work around win32.alpha intrinsic clash with -O
+98-11-11 regress: fix UNIT PATH lookup
+98-11-01 regress: add PROG
+98-10-01 hostinfo: add unixware.*
+	 use: export PACKAGE_*
+98-08-11 C.probe: add /usr/include check (for sco CC)
+	 hostinfo: handle uwin uname update
+98-05-01 regress: fix bug sometimes didn't list last test
+98-04-01 hostinfo: add cc path arg
+	 hostinfo: now works with /bin/sh
+	 Makefile: strengthed -lm probe
+98-01-23 Makefile: check for -ldl -lm
+	 C.probe: handle gcc -v -E phony include dirs
+	 iffe: fix lcl by dropping sort -u -- we need the real first
+	 iffe: `mem x' to test if x is a non-opaque struct
+98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3
+	 $(INSTALLROOT)/lib64 for sgi.mips4
+	 add cc.hp.pa
+98-01-01 cc.sgi.mips*: turn off ld library multiply defined
+97-10-11 regress: add VIEW function for locating data
+97-10-01 Makefile: -ldl test moved to libdll Makefile
+97-08-11 regress: add MOVE
+	 regress: add SAME
+	 regress: use getopts
+	 regress: `EXEC' repeats previous test
+97-07-17 use: tweak PATH and LIBPATH bootstrap order
+	 iffe: fix lcl bug that botched pathnames with embedded spaces
+97-06-12 iffe: add npt `needs prototype' test
+97-05-09 hostinfo: mvs.* => mvs.390
+	 Makefile: cc.$(_hosttype_) workaround installed here
+	 iffe: fix nolink{ ... }end
+	 iffe: add [no]static{ ... }end for static link test
+	 C.probe: _probe_PATH => _probe_export which must be eval'd
+97-04-01 use: _RLD_ROOT set too
+97-03-17 mm2html: changed inner loop
+	 mm2html: handle .if|.ie|.el, .so
+	 mm2html: handle different man styles
+	 mm2html: differentiate mm/man in some non-obvious cases
+	 hostinfo: r5000 is not mips4
+97-02-14 hostinfo: validate type with cc
+96-12-25 C.probe: uwin tweaks
+	 iffe: use `...` instead of $(...) for alpha /bin/sh
+	 iffe: fix `typ' divide by 0
+	 iffe: `lcl' now drops X: prefix
+	 iffe: +l* -> -l*
+	 iffe: eval around ${...#%...} for bsd /bin/sh
+	 use: add sgi.mips LD_LIBRARY<abi>_PATH variants
+	 use: add -e to list exports
+	 iffe: lcl leaves leading [a-zA-Z]: for dos
+	 iffe: fix no{link|output|execute} logic
+	 C.probe: don't automatically add /usr/include for non-hosted compilers
+	 C.probe: don't automatically place /usr/include last
+	 C.probe: check gcc style -v -E for stdinclude usrinclude
+96-11-28 iffe: check BASH_VERSION for IFS botch
+	 iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx)
+	 hostinfo: fix sgi.mips[234] tests
+	 hostinfo: fix ncr.i386 tests
+96-10-31 iffe: work around old bsh here doc bug by running separate sh
+96-10-11 iffe: *.iffe and *.iff for iffe src files
+	 hostinfo: tighten sgi.mips cpu type check
+96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib
+96-09-17 iffe: fix typ bug that failed for single id types!
+96-08-31 hostinfo: handle recent sgi hinv cpu changes
+96-07-17 make sure sizeof(long xxx)>sizeof(xxx) for typ long.xxx
+96-05-09 C.probe: drop multiple / in stdinclude
+96-02-29 use: package root must have bin and lib subdir
+	 mm2html: add
+	 C.probe: probe_members += -whole-archive for gcc
+	 iffe: add + fix the blasted `...'...\\...'...`
+96-01-31 use: add pkg dir
+	 hostinfo: add tandem
+96-01-01 hostinfo: windows_nt|windows[0-9][0-9] -> win32
+95-11-24 hostinfo: linux-aout.* for non-elf linux
+95-11-11 use: add aix LIBPATH
+95-10-11 hostinfo: no args prints type
+95-08-11 use: add
+95-05-09 save original PATH in _probe_PATH
+	 beef up library dir probe
+95-04-01 use c source suffix if it still preserves the dialect
+	 add hostinfo
+	 add lib/hostinfo/typemap user type map
+	 add sol.sun4 cpu count
+	 fix C.probe to properly handle C/C++ combined compiler drivers
+	 add NeXT to hostinfo
+	 bummer: mach has /usr/bin/hostinfo
+95-03-19 fix dialect executable test
+95-03-19 --- release 0.0 ---

+ 1007 - 0
cde/programs/dtksh/ksh93/lib/package/INIT.html

@@ -0,0 +1,1007 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
+<HTML>
+<HEAD>
+<META name="generator" content="mm2html (AT&amp;T Research) 2012-01-11">
+<META name="description" content="INIT package">
+<META name="keywords" content="software, package">
+<TITLE> INIT package </TITLE>
+<META name="author" content="gsf+dgk+kpv">
+<STYLE type="text/css">
+div.FI	{ padding-left:2em; text-indent:0em; }
+div.HI	{ padding-left:4em; text-indent:-2em; }
+dt	{ float:left; clear:both; }
+dd	{ margin-left:3em; }
+</STYLE>
+</HEAD>
+<BODY bgcolor=white link=slateblue vlink=teal >
+<TABLE border=0 align=center width=96%>
+<TBODY><TR><TD valign=top align=left>
+<!--INDEX--><!--/INDEX-->
+<P>
+<P><CENTER><FONT color=red><FONT face=courier><H3><A name="INIT package">INIT package</A></H3></FONT></FONT></CENTER>
+The INIT package is required by all but the standalone
+and self extracting archive packages. It contains
+the package command, support scripts, and utilities.
+The package command installs binary packages, makes
+source packages, and generates new package tarballs.
+Components in this package:
+<P>
+<P></P><TABLE border=0 frame=void rules=none width=100%><TBODY><TR><TD>
+<TABLE align=center bgcolor=papayawhip border=0 bordercolor=white cellpadding=2 cellspacing=2 width=99% >
+<TBODY>
+<TR><TD align=left>
+INIT</TD></TR>
+</TBODY></TABLE></TD></TR></TBODY></TABLE>
+<P>
+The software is covered by this license:
+<UL type=square>
+<LI>
+<A href="http://www.eclipse.org/org/documents/epl-v10.html">http://www.eclipse.org/org/documents/epl-v10.html</A>
+</UL>
+Individual components may be covered by separate licenses;
+refer to the component source and/or binaries for more information.
+<P>
+A recent
+<A href="#release change log">release change log</A>
+is also included.
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="release change log">release change log</A></H3></FONT></FONT></CENTER>
+<PRE>
+
+All recorded changes follow.
+
+</PRE>
+<P>
+<P><HR><CENTER><FONT color=red><FONT face=courier><H3><A name="INIT changes">INIT changes</A></H3></FONT></FONT></CENTER>
+<PRE>
+
+12-07-17 iffe.sh: add C code NOTE("...") to amend --verbose output
+12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo()
+12-06-20 package.sh: use $KSH for rt in "results test"
+12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB =&gt; PLUGIN_LIB
+12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB =&gt; PLUGIN_LIB
+12-06-13 package.sh: handle admin.db column output
+12-06-08 iffe.sh: fix 12-06-06 typo
+12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last &amp; -lm)
+12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile
+12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h =&gt; $(INSTALLROOT)/$(ID)/prototyped.h
+12-05-28 iffe.sh: api foo YYYYMMDD =&gt; FOOAPI(rel) test macro
+12-05-24 package.sh: change admin.db comment =&gt; owner attributes
+12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit
+12-04-17 package.sh: skip sh version logic for ``use''
+12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE =&gt; _LARGE_FILE_API moved to libast/features
+12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE
+12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness
+12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list
+12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH
+12-02-29 package.sh: fix ksh vs -lcmd compatibility checks
+12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
+12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
+12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
+12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
+12-01-21 Makefile: :PACKAGE: license=ast -- oops
+12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs
+11-12-13 iffe.sh: add /*&lt;NOSTDIO&gt;*/ test code comment to disable default #include &lt;stdio.h&gt;
+11-11-11 C+probe: test for .so before .sl
+11-10-26 package.sh: don't forget about *.pkg for admin update
+11-10-18 cc.*-icc: update and add more
+11-10-11 package.sh: handle package make|view when no source installed
+11-09-11 package.sh: count admin '*** termination code' errors
+11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps
+11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...''
+11-08-29 iffe.sh: trap EXIT =&gt; trap 0 for ancient sh
+11-08-11 iffe.sh: handle ancient sort that doesn't have -k
+11-06-01 make.probe: add more /lib64 logic
+11-05-01 package.sh: fix admin ditto to sync LICENSES too
+11-03-25 package.sh: initialize { $SED $TR } before first use!
+11-03-21 package.sh: fix vpath probes
+11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.*
+11-02-24 package.sh: change curl usage to "curl -L ..."
+11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archaic.*###
+11-02-02 Makefile: add :MAPLIB: check for ancient -lw
+11-02-02 make.probe: handle -print-multi-directory =&gt; 64 =&gt; /usr/lib64 /lib64
+11-02-02 package.sh: HOSTTYPE=*,*cc*&#0091;,-*,...&#0093; sets CC &#0091; and CCFLAGS &#0093;
+11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks
+11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream
+11-01-07 iffe.sh: check debug==3 for is_hdr() failure
+10-11-22 ditto.sh: fix timing problem between |&amp; and exec &amp;p
+10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path
+10-10-10 package.sh: list main env vars at start of make action
+10-10-10 ratz.c: tweak windows delays
+10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC
+10-09-01 package.sh: fix ratz from source logic
+10-08-25 package.mk: consolidate license file search in .package.licenses.
+10-08-22 ratz.c: run sear bootstrap command detached
+10-08-20 C+probe: version_stamp only if version_flags works
+10-08-17 package.sh: unset makerules *DIR variables in env
+10-08-15 package.sh: "make" action now lists some env values
+10-08-11 mktest.sh: add "DO command ..."
+10-07-27 rt.sh: handle "rt X=Y ..."
+10-06-29 ratz.c: non-option sear args passed to sear_exec()
+10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings
+10-06-25 package.sh: "force admin ditto" =&gt; no ditto --update option
+10-06-22 C+probe: handle cc that require .&#0091;ci&#0093; input for version info
+10-06-21 ditto.sh: change default remote access to ssh (about time)
+10-06-12 regress.sh: DIAGNOSTICS &#0091; 1 | 0 | pattern &#0093; and fix EXIT for all
+10-06-09 package.sh: add AT&amp;T to usable nmake check
+10-06-06 iffe.sh,iffe.tst: add { api ver } ops
+10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info
+10-04-15 iffe.sh: don't forget candidate headers for hdr|sys!
+10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1)
+10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH
+10-02-11 package.sh: fix package admin make report error count
+10-02-02 package.sh: fix write binary bug that did scp on local fs
+10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst
+10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check
+10-01-01 make.probe: handle &#0091;'"&#0093; in CC.VERSION.STRING
+09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS
+09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
+09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
+09-11-11 package.sh: re-order and combine cc checks
+09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
+09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
+09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
+09-10-06 package.sh: stub in ar intercept checks -- not used yet
+09-10-06 ar.ibm.risc: add ar intercept because some aix require -Xfoo first!!
+09-09-24 regress.sh: fix UMASK logic to create test support files before umask
+09-08-28 release.c: change docs to mention stdin if no file operands
+09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space
+09-08-20 make.probe: add CC.SHARED.NAME
+09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO }
+09-08-11 package.sh: filter lines containing : for package results
+09-07-31 make.probe: add CC.AR.ARFLAGS (for aix ar -xany)
+09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options
+09-06-24 package.sh: fix admin.db output formatting
+09-05-05 package.sh: export dll hackery environment vars
+09-05-05 package.sh: handle non-identifier hostnames
+09-05-05 mamake.c: pass undefined ${...} identifiers to the shell
+09-05-05 mamake.rt: add macro expansion regression tests
+09-05-01 iffe.sh: fix output initialization *again*
+09-04-28 package.sh: handle admin.db contact field $9
+09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops
+09-03-31 regress.sh: EXPORT before test =&gt; global ENVIRON&#0091;&#0093;
+09-03-26 package.sh: test fail pattern is 'fail&#0091;es&#0093;'
+09-03-26 UNIT - ... appends (options) to command line
+09-03-19 TEST.mk: x.tst =&gt; x only if x is command target
+09-03-15 regress.sh: add ${MAIN} for base name of main unit
+09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir
+09-03-03 regress.sh: allow command line unit to override UNIT
+09-03-03 mktest.sh: handle IO == $'
+09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs
+09-01-30 cc.mvs.390: c89 balks at &#0091; ()&#0093; in -Dname="..."!
+09-01-27 package.sh: add isascii() to use ratz instead of tar
+09-01-20 hurl.sh: add --size=bytes option
+09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding
+09-01-03 regress.sh: fix UNIT to allow command line override
+09-01-03 mktest.sh: handle TWD
+08-12-24 package.sh: fix cross-compile HOSTTYPE logic
+08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 }
+08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!!
+08-09-30 rt.sh: fix ksh93 regression test signal count
+08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input
+08-09-24 package.sh: package only test foo =&gt; make --recurse=only recurse tests foo
+08-09-20 make.probe: handle another /usr/bin/file shared lib description
+08-09-20 regress.sh: add --pipefail for SET pipe-input ...
+08-09-17 Makefile: add gdbm1.c for &lt;gdbm-ndbm.h&gt;
+08-09-10 make.probe: add CC.NOPROTECT
+08-08-08 mktest.sh: add --width=width
+08-08-05 dbm.req: favor sleepycat ndbm compatibility
+08-08-04 C+probe: fix stdlib initialization logic
+08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo
+08-06-20 TEST.mk: make the localyunit before *.rt =&gt; *.tst -- doh
+08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2
+08-06-11 regress.sh: fix bug that skipped the last test
+08-05-20 regress.sh: add --local to put *.tmp dir in local fs
+08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI
+08-05-01 package.sh: package test =&gt; ulimit -c 0
+08-04-28 regress.sh: fix EXPORT quoting
+08-04-28 regress.sh: fix UNIT set check args too
+08-04-24 rt.sh: exit code &gt; 256 =&gt; signal termination
+08-04-10 C+probe: change probe_so order to check .so last (macos ld workaround)
+08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST
+08-03-28 C+probe: add C++ #include &lt;iostream&gt; (no extension) dir probes
+08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally
+08-02-28 make.probe: fix probe_warn to include ld!
+08-02-02 make.probe: add CC.RUNPATH to match default -L order
+08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH
+08-01-31 iffe.sh: tweak ancient /bin/sh workarounds
+08-01-28 make.probe: darwin ld export dynamic is -force_flat_namespace
+08-01-28 C+probe: handle sgi cc error message but exit 0 botch(es)
+08-01-23 package.sh: fix checksum doc typo
+08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list
+07-12-14 iffe.sh: add set nooptimize
+07-12-03 package.sh: add LC_ALL=C
+07-11-27 package.sh: fix overaggressive *.md5 cleanup
+07-11-20 iffe.sh: treat exit status &gt;= 250 as normal error with no signal
+07-11-05 package.sh: fix write op error count pattern
+07-11-05 package.mk: fix $(~req) .ver binding
+07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION&#0091;.STRING&#0093;
+07-08-01 package.sh: handle 'package read lcl|tgz'
+07-05-08 regress.sh: execute basename instead of absolute path for short $0
+07-04-27 cc.sgi.mips&#0091;34&#0093;: for #error to exit non-zero -- a no brainer
+07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh
+07-04-11 mamprobe.sh: handle $(CC.*) =&gt; ${mam_cc_*}, $(...) =&gt; ${...}
+07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG
+07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe
+07-03-28 package.sh: fix binary tgz architecture type duplication
+07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst
+07-03-28 iffe.sh: add -F header to mac test
+07-03-23 make.probe: handle file(1) that returns 'archive' for .so
+07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF
+07-03-11 package.sh: add nocopyright and tst =&gt; nocopyright
+07-03-11 package.mk: add copyright=0
+07-03-08 C+probe: restore IFS after probe.ini
+07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR}
+07-01-05 package.sh: fix "admin write binary" logic
+07-01-01 iffe.sh: add "cmd" --verbose trace
+07-01-01 iffe.sh: sort =&gt; LC_ALL=C sort
+07-01-01 C+probe: LC_ALL=C
+06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local!
+06-11-23 package.sh: *.md5 are not tarballs -- doh
+06-11-23 iffe.sh: add -F, --features=feature-test-header
+06-11-11 make.probe: favor lib64 over lib for hosttype==*64
+06-10-31 make.probe: add "-ignore-source-dir -iquote" test
+06-10-31 iffe.sh: add status{...} code block
+06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?)
+06-10-11 package.sh: handle already gunzip'd *.tgz
+06-10-06 iffe.sh: add reference for header content tests
+06-09-27 regress.sh: fix UMASK to do DO too (duh)
+06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics)
+06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together
+06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too
+06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io
+06-09-05 C+probe: add { probe_version version_stamp version_string }
+06-09-05 make.probe: add version stamp comment, CC.VERSION&#0091;.STRING&#0093;
+06-08-27 regress.sh,mktest.sh: add UMASK
+06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE
+06-08-25 mktest.sh: add IGNORESPACE
+06-08-24 mktest.sh: handle &nbsp;00 in data
+06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR
+06-08-16 package.sh: fix 'install flat' logic
+06-08-11 rt.sh: handle style=shell %K date format
+06-07-17 ratz.c: fix __MVS__ FAR definition
+06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe
+06-07-17 package.sh: differentiate urls vs. assignments
+06-06-27 rt.sh: add --failed, --heading
+06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0'
+06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance
+06-06-25 mktest.sh: implement PROG
+06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk
+06-05-06 package.sh: add PACKAGE_admin_tail_timeout
+06-05-22 ratz.c: upgrade to zlib-1.2.3
+06-05-09 package.sh: fix admin.db docs
+06-03-11 package.sh: fix `package use - command ...'
+06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.`
+06-02-14 package.sh: "results failed test" == "results test failed"
+	 cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0
+	 cc.linux.ia64-icc: add for intel cc
+06-02-02 package.sh: freebsd stuck with os version for all arch
+06-02-01 package.mk: fix locale logic (tw -d requires dir arg)
+06-01-31 package.sh: require $CC only for make|test
+06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd
+	 package.sh: add more pdksh =&gt; /bin/sh checks
+06-01-26 package.sh: wget --http-pass =&gt; --http-password
+	 package.sh: fix wget error logic
+	 hurl.sh: wget --http-pass =&gt; --http-password
+06-01-11 package.mk: pass package.license.class to make --mam too
+	 package.mk: variants=pattern =&gt; --variants=pattern
+	 package.sh: darwin rel&lt;=7 =&gt; darwin7.ppc
+	 package.sh: freebsd rel&lt;=4 =&gt; freebsd4
+	 package.sh: freebsd rel&lt;=5 =&gt; freebsd5
+05-12-07 iffe.sh: don't emit &lt;stdio.h&gt; if &lt;sfio.h&gt;|&lt;ast.h&gt; (XXX)
+05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0
+05-09-22 mktest.sh: add EXEC &#0091; ++NOOUTPUT ++NOERROR ++NOEXIT &#0093;
+05-09-21 mktest.sh: fix --style=shell compare to ignore \r
+05-09-12 TEST.mk: all --force to force %.rt regeneration
+05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst
+05-08-25 mktest.sh: add
+	 TEST.mk: add %.rt=&gt;%.tst for mktest
+05-08-18 package.sh: 'package host cpu' now checks $NPROC first
+05-07-17 iffe.sh: add { define extern include print } ops
+	 iffe.sh: accept output{...}end output on success only -- doh
+05-07-01 package.sh: add TARPROBE for tar B flag probe
+05-06-24 package.sh: fix binary read chmod via *.sum
+05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types
+05-06-01 make.probe: verify that cc_pic works for hosted cc
+	 cc.lynxos.ppc: make -mshared the default
+	 package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation
+05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT
+05-05-24 iffe.sh: really fix grouping logic -- with tests this time
+	 package.sh: pipe/socket configuration mismatches =&gt; use /bin/sh
+05-04-28 TEST.mk: add $(TESTS)
+05-04-19 package.sh: package results test uses rt if possible
+	 iffe.sh: fix 'op var - ... - ...' grouping logic
+05-04-15 rt.sh: handle autom4ate style
+05-04-11 regress.sh: fix unit name when command line unit also specified
+	 rt.sh: handle all ast package test output formats
+	 package.sh: fix make docs for options passed to underlying make
+05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime
+	 regress.sh: add "TITLE name" to change TEST output title
+05-04-01 rt.sh: add pretty make test + regress.sh wrapper
+05-03-29 package.sh: test -e path =&gt; test -f path -o -d path
+05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh
+05-03-19 mamake.c: command line name=var also defines name.FORCE=var
+05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd
+	 package.sh: old make.out saved in circular make.out.&#0091;1-9&#0093;
+	 mamake.c: sync with nmake :W=O:
+05-03-01 package.sh: fix flat hierarchy initialization
+	 package.sh: admin action now properly resets sibling remote logs
+	 package.mk: relax unknown/unwritten package messages to warnings
+	 package.sh: handle space in command line name=value
+	 make.probe: add mvs -Wc,dll,exportall,longname,rent to CC.DLL probe
+05-02-24 package.sh: hosttype *.powerpc =&gt; *.ppc
+	 cc.lynxos.ppc,ldd.lynxos.ppc: add
+05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug
+05-02-20 probe.win32: handle /platformsdk mount
+05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir
+05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 -
+05-02-14 package.sh: handle multiple architectures per host in admin.db
+	 Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides
+	 package.sh: normalize trailing &#0091;-_&#0093;bits in host type
+	 iffe.sh: some ksh-compatible shells don't do *(pattern)
+05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack
+	 cc.lynxos.i386: -dynamic instead of -static default
+05-02-10 package.sh: cyg usr/doc =&gt; usr/share/doc
+05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08
+	 iffe.sh: work around old bash 0&lt;... redirection bug
+05-02-06 package.mk: source.tgz: update generated files only when they change
+05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow
+05-01-11 package.sh: update setup docs to include authorize+password
+	 package.mk: fix .source.cyg final directory edit
+	 package.mk: notice=1 for conspicuous empty NOTICE file
+	 WWW.mk: fix *-index.html installation
+	 filter.sh: retain input file suffix in tmp copy
+	 mamexec.c: fix non-contiguous "exec" bug that skipped lines
+	 iffe.sh: fix candidate lib test to try grouping subsequent libs
+	 iffe.sh: fix child process stdin hijack that skipped input lines
+	 iffe.sh: --shell=osh to force read -r compatibility command
+	 iffe.sh: chop iffe input leading space before # for KnR compatibility
+05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes
+	 mamake.c: fix makefile scan to ignore lib*.&#0091;hH&#0093;
+	 iffe.sh: immunize function/symbol tests from aggressive -O
+04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator
+04-12-21 ratz.c: make sure tmp dir is writable -- doh
+04-12-08 iffe.sh: fix dat test for aggressive -O
+04-12-01 iffe.sh: add `include file' to pull in #define's for `exp'
+04-11-11 package.sh: default MAKESKIP is "*&#0091;-.&#0093;*"
+04-10-22 ratz.c: change docs to note zlib license
+	 mamake.c: handle --debug-symbols and --strip-symbols
+	 package.sh: make (debug|strip)=1 =&gt; --(debug|strip)-symbols
+	 package.mk: add :LICENSE: =&gt; package.license.class
+	 mamake.c: fix recursive order logic
+04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs
+04-10-11 package.sh: add 'authorize name' and 'password password'
+04-10-01 iffe.sh: double check $static link with ! $static
+	 Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+	 make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL}
+	 package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+04-09-21 package.mk: $(init)$(name) is now an implicit prereq
+04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok
+04-09-01 package.mk,package.sh: rename *.txt =&gt; *.README
+	 package.mk: add the runtime package type (no *.&#0091;ah&#0093;)
+	 iffe.sh: fix key test reports
+04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp&#0091;l&#0093; ldexp&#0091;l&#0093; }
+04-08-11 package.mk: handle HOSTTYPE for solaris &gt; 9
+	 package.sh: add `checkaout proto' for { make view }
+	 package.sh: check for { md5sum md5 }
+	 iffe.sh: add {if|elif|else|endif} test ...
+	 iffe.sh: add 'exp - expression' and '( expression )'
+	 iffe.sh: add 'name = test ...' user defined macros
+	 iffe.sh: add '! test ...' negation
+	 TEST.mk: add implied { .c .sh } generated prereq
+	 cc.darwin.ppc: handle 10.3 -dylib mess
+04-08-01 package.mk: let include handle nested requirements -- duh
+04-07-31 package.sh: attempt a second ping before admin assumes host down
+04-07-26 package.sh: fix hp.ia64 HOSTTYPE
+04-07-23 probe.win32: generalize #include dir order search
+04-07-17 regress.sh: add INPUT -x for chmod +x
+04-07-01 regress.sh: TMP =&gt; TWD
+04-06-29 regress.sh: put COMMAND in $TWD too
+04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs
+	 TEST.mk: add :TEST: -- to disable .c .sh search
+04-06-18 TEST.mk: add .SCAN.tst
+04-06-17 regress.sh: TEST returns true if active, false otherwise
+	 regress.sh: add CD to change test pwd from $TWD
+04-06-16 regress.sh: add TWD for ./unit.tmp override
+	 regress.sh: DO now flushes previous test
+	 regress.sh: INPUT and OUTPUT handle -f for printf instead of print
+04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH
+	 package.sh: skip nmake if older than 2000-10-31
+04-05-20 package.sh: fix arg vs. package parse with - or '' to disambuguate
+04-05-11 package.sh: package verbose update lists closure for package setup
+	 package.sh: add src/lib/libardir to nmake proto bootstrap
+	 regress.sh: probe for rm -u vs. chmod -R u+rwx
+04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH
+04-04-15 make.probe: check probe_libdir false positives
+	 package.sh: add lib/package/*.lic src package subdirs
+	 package.mk: add mamfile=0 to inhibit Mamfile generation
+	 iffe.sh: config name_DECLARED =&gt; HAVE_name_DECL
+	 iffe.sh: fix mac to handle default value
+04-04-11 iffe.sh: normalize sed &#0091;\\\\/&#0093; quoting
+04-04-04 package.mk: only checksum generated tarballs
+	 mamprobe.sh: add STDCHMOD
+04-04-01 C+probe: set export LANG=C for uniform error messages
+	 make.probe: another CC.STDLIB tweak
+	 package.sh: fix regress core dump pattern, expand &#0091;a-z&#0093; match ranges
+04-03-31 Makefile: add intl :MAPLIB: test
+	 make.probe: fix CC.STDLIB search; drop CC.* path duplicates
+04-03-28 iffe.sh: drop unused exec $stdin&lt;&amp;0 dup
+04-03-25 Makefile: add iconv :MAPLIB:
+	 package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override
+04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: update base change on md5 sum instead of size
+	 iffe.sh: adjust case label &nbsp;and keyword quoting for ancient /bin/sh
+04-03-22 probe.win32: ncc =&gt; nld
+04-03-19 CONVERT.mk: change the instructions and old source dir default
+	 package.mk: fix recurse=list check
+	 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: fix update base/delta/sync existence check
+04-03-18 iffe.sh: -d2 does not remove core dumps on exit
+04-03-17 package.sh: fix make recurse arg/action order
+04-02-29 package.sh: add regress action to compare current and previous tests
+	 package.sh: fix sgi.mips&#0091;23&#0093; HOSTTYPE test for old irix cc
+	 package.sh: add `export variable ...'
+	 package.sh: admin action now handles host name with non-id chars
+	 package.sh: non-numeric M T W in admin.db disables that action
+	 package.sh: fix admin write binary local vs. shared clash
+	 cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable
+	 cc.hp.pa64: sync with cc.hp.pa
+	 cc.ibm.risc: -bnolibpath =&gt; -blibpath:/usr/lib:/lib
+	 probe.win32: sync with make.probe
+	 make.probe: fix last chance dynamic test
+	 make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E
+	 make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall
+	 make.probe: move probe_dll_def to the end of probe_dll
+	 package.mk: capture subcomponent mamfile recursion
+04-02-24 make.probe: strip "..." from cc/ld traces
+	 iffe.sh: add ``set &#0091;no&#0093;define'' to disable macro #define/#undef
+04-02-23 make.probe: rework CC.LD search
+04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export
+	 make.probe: resurrect CC.PIC with separate semantics from CC.DLL
+	 make.probe: add CC.SHARED.LD for CC.SHARED linker
+	 C+probe: clear DISPLAY to stifle interactive windows
+04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end
+	 make.probe: add { CC.AR CC.SIZE }, fix cross command search
+	 cc.darwin.ppc: change $cc =&gt; $CC for old ksh + libast conf bug
+04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++
+04-02-04 package.sh: fix cross compilation bug that mixed binary formats
+04-02-02 package.sh: package admin now ditto's bin/package too
+04-01-30 cc.sgi.mips3: drop warning 3421
+04-01-11 regress.sh: output label#count for tests in loops
+04-01-05 regress.sh: fix bug that ignored the first SAME
+04-01-04 crossexec.sh: fix typo that did not recognize rcp
+03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse()
+03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency
+03-09-23 ratz.c: fix tar header number parse bug that skipped to next number
+	 regress.sh: rm cleanup now handles files matching -*
+03-09-11 iffe.sh: add unnamed { ... } blocks
+	 regress.sh: add COPY from to, like MOVE but comprison still done
+	 regress.sh: rm -rfu to handle test dirs w/o u+rwx
+03-08-14 Makefile: add hello.c to the manifest
+03-08-11 package.sh: fix `html binary' generation
+03-06-21 package.sh: fix INITROOT initialization bug
+	 package.sh: make sure admin logs exists before tail'ing
+03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
+	 cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
+	 package.sh: fix onpath function global var conflict
+	 make.probe: add CC.DIALECT { GNU -dD }
+	 package.mk: add Mamfile to lcl manifest
+03-06-10 package.sh: fix setup action typo that only checked the INIT package
+	 package.sh: *.s390x =&gt; *.s390-64
+03-06-09 package.mk: add cyg :POSTINSTALL:
+03-06-08 make.probe: fix CC.STDLIB logic
+	 hurl.sh: add User-Agent identification
+	 package.sh: tweak source and binary installation instructions
+	 cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths
+	 ldd.hp.pa: add
+03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check
+	 make.probe: add CC.STDLIB verification
+03-06-04 make.probe: add +forceread +noforceread
+03-05-11 hurl.sh: handle http://host:port/path
+03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic
+03-05-05 package.mk: fix cygwin tarball names
+03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile
+03-04-27 make.probe: fix mvs CC.PREFIX.SHARED "lib" =&gt; ""
+	 make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR)
+	 make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD }
+	 probe.win32: sync with latest CC.*
+03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh
+03-04-23 package.mk: fix dup "covered by" licenses
+03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's
+	 package.sh: fix admin write binary tarball snarf
+03-04-21 package.mk: package covered *.@(pkg|lic) too
+03-04-15 package.mk: don't generate incremental archives for lcl
+	 package.mk: add incremental=&#0091;source:1 binary:0&#0093; archive control
+	 package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc
+	 package.sh: admin must ditto lib/package/*.@(pkg|lic) too
+	 mamake.c: ignore time of ignore prereqs
+	 mamake.c: -D2 lists propagated times
+03-04-11 package.mk: tidy up cyg tarballs
+	 package.sh: fix old shell clash between get() and $get
+03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions
+	 package.sh: add pthread_num_processors_np() last resort for cpu count
+	 package.sh: use `make believe' to accept mamake generated files
+	 package.sh: handle `make &#0091;make-flags&#0093; &#0091;target ...&#0093;'
+	 mamake.c: ignore -e
+03-03-21 package.mk: fix cyg old make typo
+	 package.sh: switch to `package setup' instructions
+03-03-19 package.sh: add registry checks for `host cpu'
+	 package.sh: `results failed' now lists core dump messages
+03-03-17 package.sh: on cygwin verify 'ntsec binmode' in $CYGWIN or die
+	 Makefile: install gcc wrapper if no cc
+	 package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops
+03-03-12 package.mk: add :DETAILS: for style-specific details
+03-03-11 package.sh: add beta setup/update support
+	 TEST.mk: add (TESTCC) prereq for .sh tests
+03-03-07 hurl.sh: add
+03-03-06 iffe.sh: fix lib win32 test cygwin vs native incompatibility
+	 iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro
+03-03-03 package.sh: check for curl or wget for update
+	 package.sh: add setup action == update read make
+	 package.sh: fix packageroot() typo that showed up in non ~user shells
+	 mamake.c: treat name+=value args like name=value
+	 mamake.c: add ${var?*|value?match?no-match?}
+	 mamake.c: fix archive vs. dynamic bind logic
+03-02-28 package.sh: add the "cyg" (cygwin) package type
+	 package.mk: add "cyg" stubs, :CATEGORY: for category name(s)
+03-02-25 mamake.c: add -D4 system(3) debug trace
+03-02-24 package.mk: change --mismatch to --corrupt=accept
+03-02-14 ratz.c: add _WIN32 setmode(&#0091;01&#0093;,O_BINARY) and fopen "rb"/"wb"
+03-02-12 Makefile: handle getconf LIBPATH with host pattern
+03-01-31 package.mk: fix .lic search
+03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere
+	 package.sh: admin handles command outside of $PACKAGEROOT/bin
+	 Makefile: install $(INSTALLROOT)/lib/make/package.mk
+03-01-28 package.sh: admin remote commands on one line to please syslog
+03-01-23 probe.win32: borland and mingw32 tweaks
+03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh
+03-01-16 ditto.sh: tw --chop on by default
+03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/
+	 package.sh: admin now initiates remote exec and copy from local host
+03-01-12 package.sh: handle admin "xxx:" default root
+03-01-03 probe.win32: add /usr/include/borland path truncation workaround
+02-12-10 iffe.sh: add &lt;&amp;$nullin &gt;&amp;$nullout to checkread() $cc
+02-12-06 probe.win32: fix inlcude =&gt; include typo, add lcc lib
+	 probe.win32: CC.MAKE.OPTIONS = nativepp=0
+02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined
+02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks
+02-11-26 package.sh: package release now checks for second level files
+02-11-22 package.sh: update action now uses HTTP/1.0
+02-11-21 probe.win32: update the vc include dir test
+02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var
+02-11-13 packahe.mk: fix list.install =&gt; list.installed typo
+02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search
+	 make.probe: add CC.LD.STRIP for link time a.out strip
+	 package.sh: fix package_use vs. PACKAGE_USE check
+02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post
+02-10-23 mamake.c: fix unuinitialized time in make()
+	 ratz.c: fix meter buffer overflow
+02-10-20 package.sh: fix lib/probe/C/make/probe update test
+02-10-18 probe.win32: update for mingw
+	 make.probe: add bash workaround to SHELLMAGIC test
+	 package.sh: work around yet another cygwin hassle
+02-10-17 iffe.sh: short circuit id check for *&#0091;-+/\\&#0093;*
+02-10-08 regress.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: $CC must at least compile and executable hello world
+02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=&gt;$PACKAGEROOT/lib/package/tgz
+	 package.mk: $(ED) =&gt; $(STDED), $(EDFLAGS) =&gt; $(STDEDFLAGS)
+	 iffe.sh: add identifier checks for tests that (implicitly) require them
+	 iffe.sh: disambiguate a few --config macros
+02-10-02 iffe.sh: fix shell=bsh `hdr a/b'
+02-09-30 package.sh: handle chmod of -* files
+	 package.sh: verify that $SHELL is Bourne compatible
+	 package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation
+	 iffe.sh: fix bug that didn't define mac variable on success
+02-09-22 package.sh: handle admin_action=ditto
+	 iffe.sh: --config sizeof(foo) macro is SIZEOF_foo
+	 iffe.sh: fix long.long test so it doesn't defeat uwin "typ long.long"
+	 mamprobe.sh: convert $("foo") nmake string constants
+02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout
+02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
+	 mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
+	 mamake.c: pass cc absolute path to mamprobe
+	 package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
+	 iffe.sh: lcl,nxt: drop default sys/ check
+	 ditto.sh: tw --logical by default; add --physical
+02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
+02-09-09 ditto.sh: test that remote .profile exists before sourcing
+02-09-06 package.sh: don't ditto nfs junk
+	 ditto.sh: --show now lists directory ops instead of enumerating all
+02-09-05 ditto.sh: add --remote={rsh|ssh}
+	 package.sh: add admin &#0091;&#0091;{rsh|ssh|-}&#0093;:&#0093;directory
+02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility
+02-09-01 cc.unix.mc68k: add for ancient 3b1
+02-08-22 package.sh: fix component() to test for components -- duh
+	 Makefile: add LICENSE:.DONTCARE to workaround mam
+02-08-11 iffe.sh: provide defaults for LD_* additions
+02-08-07 ratz.c: change -m to use * instead of non-portable inverse video
+02-07-17 mamprobe.sh: close tmp file in trap before rm for cygwin
+	 package.sh: fix "type" to handle i1586 (P4)
+	 package.sh: add the view action
+02-06-28 package.sh: handle multiple packages for release action
+02-06-27 package.sh: catch sol*.sparc=&gt;sol*.sun4 when CC=gcc
+02-06-14 package.sh: fix admin_action to not include qualifiers
+	 package.sh: fix help/html doc typo
+02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*'
+02-06-07 WWW.mk: change substitute $(") to
+02-06-06 package.sh: clarify output streams for help/html
+02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH)
+02-04-04 package.sh: fix update to differentiate *.sun4 and sun4
+02-03-27 package.sh: yacc/bison warning only if both missing
+02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems
+02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package
+	 package.sh: precheck $CC, not `cc'
+	 package.sh: fix install to use pax -ps to preserve set-uid/gid
+	 package.sh: fix install to use list.installed for existing files only
+02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read
+	 package.sh: fix update delta sync fetch
+02-02-14 iffe.sh: fix macro{ }end docs to include "
+	 iffe.sh: add dfn to extract #define from headers
+	 iffe.sh: handle nxt #include ok but no line sync
+	 iffe.sh: drop local header clash logic
+	 iffe.sh: add -X, --exclude=dir to exclude -I dirs
+	 iffe.sh: lcl,nxt now generate &lt;...&gt; headers instead of "..."
+	 package.sh: admin.db root dir matching -* disables host
+	 package.mk: fix package.src.pat typo -- too many )
+	 package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 Makefile: move proto.c generation to the proto component dir
+02-02-02 execrate.sh: add for .exe challenged win32 systems/commands
+	 mamprobe.sh: add STD* commands/flags
+	 mamake.c: update mamprobe info when older than mamprobe executable
+	 package.sh: move ed/ex workaround to mamprobe.sh
+	 package.sh: fix `host type' bug that incorrectly assumed sun4 for sol
+	 package.sh: add execrate(1) hooks for challenged systems
+	 package.sh: add check for { cc ar nm yacc/bison } before make
+	 ratz.c: fix "rb" vs. "r" macro tests
+	 iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include
+	 iffe.sh,package.sh: remove vaibale from sccs,cvs ident strings -- duh
+02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B*
+	 iffe.sh: handle 'mem struct.a.b'
+02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results
+	 package.sh: uts.370 =&gt; uts.390
+02-01-18 package.sh: fix uts hosttype
+02-01-17 package.sh: add 'results failed ...' to list failures only
+	 package.sh: change ARCH internal var to all_types to avoid env conflict
+	 iffe.sh: fix hdr/lib precheck that missed some -- ouch
+	 iffe.sh: fix noexecute test that forgot to check compile first!
+02-01-15 ratz.c: fix path&#0091;&#0093; type typo
+02-01-01 package.mk: tighten license search
+02-01-08 package.sh: `pwd` =&gt; ${PWD:-`pwd`}
+	 package.mk: expand license file pattern match
+02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value"
+	 iffe.sh: fix initial &lt;sys/types.h&gt; check to honor --config
+01-12-25 iffe.sh: fix bug where -o file restored old file
+01-12-23 package.mk: uniq the closure lists
+01-12-07 ratz.c: fix --meter to retain paths containing " -- "
+01-11-30 ratz.c: use sear_system() to execute; should work on all windows
+01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status
+01-11-26 ditto.sh: drop n+=v for ksh compatibility
+01-11-21 ditto.sh: add rsync script replacement &#0091;hey, it works!&#0093;
+	 package.sh: add &#0091;ditto&#0093;:directory notation to admin.db
+01-10-31 package.sh: handle *.sum paths with embedded space
+	 package.sh: change executable() to onpath()
+	 package.sh: executable(&#0091;!&#0093; foo) replaces test &#0091;!&#0093; -x foo (.exe hack)
+	 package.sh: add os2 fix to `host type'
+	 mamake.c: add .exe hack
+	 iffe.sh: fix intrinsic function lib test
+	 mamprobe.sh: update pic probe to match make.probe for linux.ia64
+01-10-30 package.sh: make action skeleton view now checks subdirs
+01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP
+	 package.mk: tarball package.notice replaces `license accepted' prompt
+	 package.sh: eliminate `license accepted' prompt
+	 package.sh: add update to download latest from a url
+	 package.sh: use builtin arithmetic when we know it's ksh
+	 iffe.sh: unkown -&gt; unknown
+01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
+	 package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
+	 ratz.c: fix -m for paths containing <\>n</\>\r\v
+01-10-16 ratz.c: _SEA_* =&gt; SEAR_*
+	 ratz.c: preserve stdin for sear_exec()
+	 ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup
+01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC
+	 package.sh: add nfs wakeup call to admin to avoid stale file handles
+01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh)
+01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH
+	 package read: save cpy of bin/package when reading the INIT package
+	 mamprobe.sh: allow cc path with optional arguments
+01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization
+01-09-19 package.mk: add recurse to list.package.*
+	 package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32
+01-09-11 ratz.c: add _SEA_SKIP &amp; _SEA_COMMAND for self extracting archives
+01-09-07 package.mk: fix output capture to not generate files names with spaces
+01-09-07 package.mk: fix delta release number search
+01-08-11 package.mk: handle single gz executable packages (e.g., for ksh)
+	 package.sh: fix package install to require nmake only if no *.sum
+	 iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash
+01-07-17 package: fix use cross compile test to generate files in /tmp
+01-06-27 ratz: handle hard and soft links if possible
+01-06-07 Makefile: fix :MAPLIB: for sco
+01-05-31 crossexec.sh: add
+	 iffe.sh: add -x crosstype to run crossexec
+	 iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end
+	 package.sh: add package host canon external-host-type-name
+	 package.sh: fix `use USER' lookup for shells that support ~USER
+	 cc.*: add -dumpmachine to dump target HOSTTYPE
+01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops
+01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command
+01-04-26 *.sh: expand &#0091;a-z&#0093;&#0091;A-Z&#0093;&#0091;0-9&#0093; for non-contiguous character codes
+	 iffe.sh: fix run *.sh for shells that don't $* across . command
+	 cc.mvs.390: recode for /bin/sh
+01-04-25 package.mk: include non cc-g variants by default
+	 package.sh: *&#0091;._&#0093;* =&gt; *?&#0091;_.&#0093;* for mvs.390 /bin/sh
+01-04-24 TEST.mk: no tests for VARIANT=="DLL"
+01-04-22 package.mk,package.sh: tarball text members are ascii encoded
+01-04-18 package.mk: allow package name to be the same as one of its components
+         cc.mvs.390: handle .C .cpp .cxx
+         cc.mvs.390: compensate for -o that does not overwrite
+01-04-01 regress: fix SAME that just skipped it -- we should regress regress!
+	 iffe: fix bug that didn't emit _hdr_foo for internal hdr tests
+	 iffe: fix lcl bug for cc -E that doesn't emit line syncs
+	 ratz: add ascii=&gt;ebcdic conversion for text archive members
+	 mamake: fix buffer overlap bug that clobbered the probe file path
+01-03-17 iffe: handle : separator as first arg
+01-03-15 mamake.c,ratz.c,release.c: add &lt;stdlib.h&gt; and &lt;string.h&gt;
+01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
+01-02-22 cc.ibm.risc: handle SF_CLOSE clash in &lt;sfio.h&gt;
+01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
+	 C+probe: quote "$cc" when it's an argument!
+	 mamake: execute actions with $SHELL, ignored signals back to default
+	 package.sh: nmake check error output to /dev/null
+	 package.sh: fix INIT a.out updates for knr cc
+	 package.sh: package list now handles large tgz dirs
+	 package.sh: *-ok executables moved to ok/* for *.dll systems
+	 iffe.sh: change "exec &gt;&amp;-" to "exec &gt;/dev/null" else linux mkdir fails!
+	 mamake: handle `bind -lx &#0091;dontcare&#0093;'
+01-02-12 ratz.c: fix _PACKAGE_ast includes
+	 package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/
+	 package.sh: $CC ^HOSTTYPE=&#0091;A-Za-z_0-9.&#0093;*$ overrides HOSTTYPE
+	 iffe.sh: fix dat code that used previous $tmp.exe
+	 iffe.sh: fix dat code for _DLL imports
+01-02-09 iffe.sh: add copy() for shells with the disappearing here doc bug
+01-02-08 Makefile: guard against null $(CC.HOSTTYPE)
+01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged)
+01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE
+	 package.sh: create intermediate recursion makefiles when needed
+	 package.sh: add $SECONDS to the DEBUG trace prompt
+01-01-01 ratz.c: #ifdef for uwin ncc
+	 iffe.sh,package.sh: check PACKAGE_PATH for local installations
+	 package.sh: add psrinfo for osf.alpha host cpu
+	 package.sh: change pax --meter probe; some hang on /dev/tty
+	 package.sh: fix `install flat ARCH'
+	 mamake: eliminate loops from scan order
+	 C+probe: add probe_verbose -V for aix cc=xlc
+	 cc.ibm.risc,ldd.ibm.risc: add
+	 package.mk: list refs to top-level licenses only
+	 package.mk: add local link table to change log html
+00-12-25 package.sh: `no package archives' is a hard error, duh
+	 package.sh: reorder host type logic for lame shells
+	 mamake.c: getcwd =&gt; getwd for NeXT -- how about posix==default guys
+	 iffe.sh: really gross workaround for NeXT -lposix stdout null's
+	 iffe.sh: handle cc -E that insists on compiling
+00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0
+	 *.sh: `getopts 2&gt;/dev/null` =&gt; `(getopts)2&gt;/dev/null` for ancient sh
+	 package.sh: fix LD_LIBRARY*_PATH initialization
+	 cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms
+00-12-12 ratz: add --meter
+	 package.sh: a few VPATH fixes
+	 Makefile: don't override *.mips* cc if -version not accepted
+00-12-11 package.mk: *.inx now contains name=value
+00-12-07 package.sh: handle PC netscape . =&gt; _ pathname mangle
+	 WWW.mk: .tar.gz =&gt; .tgz
+00-11-27 package.sh: add checklicense() to do license checks at read time
+	 package.mk: change component list from preformat to table
+00-10-31 package.mk: *.pkg must assert closure
+	 package.mk: add cc- variants to list.package.binary
+	 package.sh: omit dups from package list
+	 package.sh: invalid arg gives one line Usage
+	 package.sh: relax checkaout checks for non-owners
+	 package.sh: package use sets NPROC if not already set or &#0091;01&#0093;
+	 proto.c: add $(INSTALLROOT)/include/ast hack
+00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE:
+00-10-25 package: fix install
+	 package.mk: add list.install
+00-10-22 regress: fix VIEW to skip empty dirs
+00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake =&gt; $(PACKAGEROOT)/bin/manmake
+	 iffe: validate #define identifiers
+00-10-18 C+probe: mac os10 additions
+	 package: add DYLD_LIBRARY_PATH initialization
+	 add ldd.$(CC.HOSTTYPE)
+00-10-01 iffe: handle -I* -L* options
+00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs
+00-09-19 C+probe: add probe_longlong
+00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake
+00-09-08 iffe: verify that $cc is a C compiler
+00-06-14 mamprobe: fix win32.* probe
+	 mamake: fix bug that used lower view path for generation
+	 package: don't clobber $PACKAGEROOT/bin/nmake
+00-06-01 C+probe: fix stdinclude *again*
+	 package: fix write delta source to use default pax format
+	 package: add disambiguating bias for sgi.mips3 over sgi.mips4
+	 package.mk: fix for directory content packages lib ast-locale
+00-05-01 iffe: fix invalid _LIB_ macro identifier
+00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude
+00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected
+00-03-17 package: all archives are .tgz for binary download
+	 package: $(PACKAGEROOT)/LICENSES/* in source and binary archives
+	 package: implement install and verify actions
+	 iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb
+	 iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk
+	 package.mk: add *.pkg :INDEX:
+00-03-07 package: add admin action
+00-03-06 makefile: install optional make probe override script C+make+probe.lcl
+00-02-14 --- release 1.0 ---
+	 ratz: treat "foo/" as a dir, not a regular file
+	 package: clarify source and binary installation instructions
+	 package: fix so binary packages can install without cc
+	 package: "ratz" now a non-archive package (the only one) for bootstrap
+	 package: handle VPATH=a:b arg
+	 package.mk: "ratz" package adjustments
+	 Makefile: use :PACKAGE_INIT: to support binary INIT packages
+	 WWW.mk: add :WWWALL:
+	 C.probe: fix .so check that let .dll slip through
+	 iffe: fix config sh var assignment for HAVE_member_IN_struct
+	 iffe: fix config sh var assignment for symbol_DECLARED
+	 package: delay PATH export until dll hack exports complete
+	 package: don't forget binary package $(INSTALLROOT)/lib(32|64)
+	 package: add delta change log for source packages
+00-02-10 mamprobe: add mam_cc_DLLBIG
+	 package: fix spelling typos
+	 package: add html help output
+	 package.mk: beef up source and binary help =&gt; html
+00-02-08 package: mkdir man/man&#0091;138&#0093; in the new arch to cover MAM bug
+00-01-28 package,release: add -rcount to release
+	 package: fix linux "host cpu" and "host rating"
+	 package: copy *.lic to $PACKAGEBIN for "make" and "write binary"
+	 package: fix 'release change log' case match
+00-01-24 package: add copyright action
+	 mamprobe: add -D_BLD_DLL to mam_cc_DLL
+00-01-11 package: tsort for package write
+	 package: early verification that $CC works
+	 package: add non-interactive command arg for use action
+	 proto: fix -C intermediate mkdir()
+	 mamprobe: unixware.i386 ksh workaround
+	 C.probe: move hosttype to C.probe (with unixware.i386 workaround)
+	 WWW.mk: fix mm2html option quoting
+	 WWW.mk: add .SCAN.mm
+	 WWW.mk: don't force static=1; grab dll's instead
+	 *.sh: fix getopts test to handle botched implementations like osf.alpha
+	 iffe.sh: fix read -r test
+99-12-25 iffe: tweak verbose messages
+	 iffe: hand code non-optget getopts parse
+	 iffe: fix bash quoting bug again
+	 iffe: do test -w . after option parse
+	 package: fix PACKAGEROOT search
+99-11-19 --- release 0.2 ---
+99-11-19 first working package &amp; friends
+99-10-31 change from lib0ast to INIT; add MAM and package bootstrap
+	 hostinfo: gobbled by package
+99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround
+99-09-27 iffe: add --all --verbose, --* set options
+99-09-22 regress: -v disables long line truncation
+99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME)
+99-08-11 hostinfo: fix type sgi.mips4
+99-06-24 WWW.mk: add
+99-06-08 hostinfo.sh: ${TMPDIR:-/tmp}
+99-06-07 TEST.mk: add
+99-06-01 iffe: add `siz type' for _siz_type == sizeof(type)
+99-05-11 hostinfo,iffe,regress,use: long options
+99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine
+99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks
+	 iffe: check that . is writable
+99-03-17 hostinfo: fix for cc not found
+	 dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE
+	 C.probe: extra check for include dirs pulled in by &lt;sys/types.h&gt;
+99-03-03 regress: add `UNIT - ...' for extra args
+	 Makefile: add (_hosttype_) prereq for cc
+99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there
+99-01-11 C.probe: shlib before lib, /usr before /
+98-12-25 iffe: work around win32.alpha intrinsic clash with -O
+98-11-11 regress: fix UNIT PATH lookup
+98-11-01 regress: add PROG
+98-10-01 hostinfo: add unixware.*
+	 use: export PACKAGE_*
+98-08-11 C.probe: add /usr/include check (for sco CC)
+	 hostinfo: handle uwin uname update
+98-05-01 regress: fix bug sometimes didn't list last test
+98-04-01 hostinfo: add cc path arg
+	 hostinfo: now works with /bin/sh
+	 Makefile: strengthed -lm probe
+98-01-23 Makefile: check for -ldl -lm
+	 C.probe: handle gcc -v -E phony include dirs
+	 iffe: fix lcl by dropping sort -u -- we need the real first
+	 iffe: `mem x' to test if x is a non-opaque struct
+98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3
+	 $(INSTALLROOT)/lib64 for sgi.mips4
+	 add cc.hp.pa
+98-01-01 cc.sgi.mips*: turn off ld library multiply defined
+97-10-11 regress: add VIEW function for locating data
+97-10-01 Makefile: -ldl test moved to libdll Makefile
+97-08-11 regress: add MOVE
+	 regress: add SAME
+	 regress: use getopts
+	 regress: `EXEC' repeats previous test
+97-07-17 use: tweak PATH and LIBPATH bootstrap order
+	 iffe: fix lcl bug that botched pathnames with embedded spaces
+97-06-12 iffe: add npt `needs prototype' test
+97-05-09 hostinfo: mvs.* =&gt; mvs.390
+	 Makefile: cc.$(_hosttype_) workaround installed here
+	 iffe: fix nolink{ ... }end
+	 iffe: add &#0091;no&#0093;static{ ... }end for static link test
+	 C.probe: _probe_PATH =&gt; _probe_export which must be eval'd
+97-04-01 use: _RLD_ROOT set too
+97-03-17 mm2html: changed inner loop
+	 mm2html: handle .if|.ie|.el, .so
+	 mm2html: handle different man styles
+	 mm2html: differentiate mm/man in some non-obvious cases
+	 hostinfo: r5000 is not mips4
+97-02-14 hostinfo: validate type with cc
+96-12-25 C.probe: uwin tweaks
+	 iffe: use `...` instead of $(...) for alpha /bin/sh
+	 iffe: fix `typ' divide by 0
+	 iffe: `lcl' now drops X: prefix
+	 iffe: +l* -&gt; -l*
+	 iffe: eval around ${...#%...} for bsd /bin/sh
+	 use: add sgi.mips LD_LIBRARY&lt;abi&gt;_PATH variants
+	 use: add -e to list exports
+	 iffe: lcl leaves leading &#0091;a-zA-Z&#0093;: for dos
+	 iffe: fix no{link|output|execute} logic
+	 C.probe: don't automatically add /usr/include for non-hosted compilers
+	 C.probe: don't automatically place /usr/include last
+	 C.probe: check gcc style -v -E for stdinclude usrinclude
+96-11-28 iffe: check BASH_VERSION for IFS botch
+	 iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx)
+	 hostinfo: fix sgi.mips&#0091;234&#0093; tests
+	 hostinfo: fix ncr.i386 tests
+96-10-31 iffe: work around old bsh here doc bug by running separate sh
+96-10-11 iffe: *.iffe and *.iff for iffe src files
+	 hostinfo: tighten sgi.mips cpu type check
+96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib
+96-09-17 iffe: fix typ bug that failed for single id types!
+96-08-31 hostinfo: handle recent sgi hinv cpu changes
+96-07-17 make sure sizeof(long xxx)&gt;sizeof(xxx) for typ long.xxx
+96-05-09 C.probe: drop multiple / in stdinclude
+96-02-29 use: package root must have bin and lib subdir
+	 mm2html: add
+	 C.probe: probe_members += -whole-archive for gcc
+	 iffe: add + fix the blasted `...'...\...'...`
+96-01-31 use: add pkg dir
+	 hostinfo: add tandem
+96-01-01 hostinfo: windows_nt|windows&#0091;0-9&#0093;&#0091;0-9&#0093; -&gt; win32
+95-11-24 hostinfo: linux-aout.* for non-elf linux
+95-11-11 use: add aix LIBPATH
+95-10-11 hostinfo: no args prints type
+95-08-11 use: add
+95-05-09 save original PATH in _probe_PATH
+	 beef up library dir probe
+95-04-01 use c source suffix if it still preserves the dialect
+	 add hostinfo
+	 add lib/hostinfo/typemap user type map
+	 add sol.sun4 cpu count
+	 fix C.probe to properly handle C/C++ combined compiler drivers
+	 add NeXT to hostinfo
+	 bummer: mach has /usr/bin/hostinfo
+95-03-19 fix dialect executable test
+95-03-19 --- release 0.0 ---
+</PRE>
+<P>
+<HR>
+<TABLE border=0 align=center width=96%>
+<TR>
+<TD align=left></TD>
+<TD align=center></TD>
+<TD align=right>August 07, 2012</TD>
+</TR>
+</TABLE>
+<P>
+
+</TD></TR></TBODY></TABLE>
+
+</BODY>
+</HTML>

+ 12 - 0
cde/programs/dtksh/ksh93/lib/package/INIT.pkg

@@ -0,0 +1,12 @@
+INIT :PACKAGE:
+
+:CATEGORY: admin utils
+
+:INDEX: the package command with support scripts and utilities
+
+:DESCRIPTION:
+	The INIT package is required by all but the standalone
+	and self extracting archive packages. It contains
+	the package command, support scripts, and utilities.
+	The package command installs binary packages, makes
+	source packages, and generates new package tarballs.

+ 0 - 0
cde/programs/dtksh/ksh93/lib/package/INIT.req


+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/INIT.ver

@@ -0,0 +1 @@
+INIT 2012-08-01 2012-08-01 1

+ 11 - 0
cde/programs/dtksh/ksh93/lib/package/ast-ast.pkg

@@ -0,0 +1,11 @@
+ast-ast :PACKAGE: libast
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs
+
+:INDEX: the ast library, period
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-ast package from AT&T Research
+	contains the ast library.

+ 22 - 0
cde/programs/dtksh/ksh93/lib/package/ast-base.pkg

@@ -0,0 +1,22 @@
+ast-base :PACKAGE: \
+		ksh93 pax html proto bzip tw builtin libast libardir libcmd \
+		libdll libexpr libodelta librecsort libsum libuu libvdelta \
+		libbz libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
+		libcoshell libcs libmam libpp libcodex paxlib codexlib \
+		libdss libpz dsslib libtaso
+
+:COVERS: ast-make ast-ksh ast-ast
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs shells
+
+:INDEX: ksh, ksh builtin commands, pax, nmake, tw, sfio, and ast libraries
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-base package from AT&T Research
+	contains commands and libraries required by all other ast based
+	packages. Included are ksh93, ksh93 builtin commands, a pax that
+	generates compact delta archives, nmake, the 3d user level versioning
+	filesystem, coshell for network execution, a multi-dialect C preprocessor
+	and companion library, and libraries shared by the other ast packages.

+ 0 - 0
cde/programs/dtksh/ksh93/lib/package/ast-base.req


+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/ast-base.ver

@@ -0,0 +1 @@
+ast-base 2012-08-01 2012-08-01 1

+ 13 - 0
cde/programs/dtksh/ksh93/lib/package/ast-dss.pkg

@@ -0,0 +1,13 @@
+ast-dss :PACKAGE: dss libdss libpz dsslib
+
+:REQUIRES: ast-base
+
+:LICENSE: *.(open|proprietary|special)
+
+:CATEGORY: algorithms database utils
+
+:INDEX: data stream scan command and support libraries
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-dss package from AT&T Research
+	contains the dss command, plugins and support libraries.

+ 89 - 0
cde/programs/dtksh/ksh93/lib/package/ast-ksh.pkg

@@ -0,0 +1,89 @@
+ast-ksh :PACKAGE: ksh93 libast libcmd libcoshell libsum libdll
+
+:COVERS: ksh
+
+:LICENSE: *.open
+
+:CATEGORY: shells
+
+:INDEX: ksh and support libraries
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-ksh package from AT&T Research
+	contains ksh and support libraries. This is the minimal set of
+	components needed to build ksh.
+
+:DETAILS: cyg
+	:README:
+		This package installs a standalone ksh93 executable ksh93.exe
+		and its man page ksh93.1.  If /bin/ksh.exe does not exist then
+		these symlinks
+			/bin/ksh.exe => ksh93.exe
+			/usr/share/man/man1/ksh93.1 => ksh.1
+		are created.  This allows alternative ksh impelementations,
+		e.g., /bin/pdksh.exe, to be selected by changing the ksh.exe
+		and ksh.1 symbolic links.  In addition, ksh and ksh93 paths are
+		added to /etc/shells if not already present.
+		$()
+		Each builtin or special command accepts the --man and --html
+		options to list the man page on the standard error. The --???
+		option describes the self documenting options available to all
+		builtin and special commands.
+		$()
+		The stanadlone ksh is statically linked with the ast libcmd
+		library which provides several builtin versions of /bin
+		commands. "builtin | grep /opt/ast/bin" lists the libcmd
+		builtins on the standard output. /opt/ast/bin/FOO accesses
+		the FOO builtin, whether the /opt/ast/bin directory exists
+		or not. "builtin FOO" allows /opt/ast/bin/FOO to be accessed
+		as FOO, bypassing the $PATH setting. To enable all libcmd
+		builtins do one of the following:
+		  (a) create the directory /opt/ast/bin and the file
+		      /opt/ast/bin/.paths with this line
+		      	BUILTIN_LIB=.
+		      and place /opt/ast/bin before /bin and /usr/bin in $PATH
+		      (this will affect all ksh subshells and scripts)
+		  (b) run "builtin $( builtin | sed -e '/\//!d' -e 's,.*/,,' )"
+		      (this will affect only the current shell)
+		Some scripts may run significantly faster with libcmd builtins
+		enabled.
+		$()
+		The ast library checks the DOSPATHVARS environment variable
+		for variable path values to convert to and from native windows
+		format when cross-executing between cygwin and non-cygwin
+		programs. The value is a space separated list of environment
+		variables to convert. PATH is handled by cygwin so it is not
+		converted by the ast library.
+		$()
+		The astksh cygwin source package provides a bootstrap build
+		environment that is not suited for an edit/build/debug cycle.
+		If you want to explore and modify the source then you should
+		install the (non-cygwinized) ast-base package which includes
+		AT&T nmake. With ast-base you will also be able to regenerate
+		the astksh cygwin source and binary packages.
+		$()
+		For more information on ksh and other AT&T ast tools see
+		   http://www.research.att.com/sw/download/
+	:EXPORT:
+		SHOPT_CMDLIB_DIR=1
+	bin/ksh93.exe :INSTALL: bin/ksh.exe
+	share/man/man1/ksh93.1 :INSTALL: man/man1/sh.1
+	:POSTINSTALL:
+		if	[ ! -e /bin/ksh.exe ]
+		then	ln -fs ksh93.exe /bin/ksh.exe
+			ln -fs ksh93.1 /usr/share/man/man1/ksh.1
+		else	echo "/bin/ksh.exe already exists"
+		fi
+		if [ -f /etc/shells ]
+		then	for i in /bin/ksh93 /bin/ksh /usr/bin/ksh93 /usr/bin/ksh
+			do	if	grep $i /etc/shells >/dev/null 2>&1
+				then	echo "$i already in /etc/shells"
+				else	echo $i >> /etc/shells
+					echo "$i added to /etc/shells"
+				fi
+			done
+		else	echo "no /etc/shells file"
+		fi
+		exit 0
+	:TEST: bin/ksh
+		KSH=$<; cd src/cmd/ksh93/tests; CYGWIN="$$CYGWIN ntsec binmode" SHELL=$$KSH $$KSH shtests

+ 0 - 0
cde/programs/dtksh/ksh93/lib/package/ast-ksh.req


+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/ast-ksh.ver

@@ -0,0 +1 @@
+ast-ksh 2012-08-01 2012-08-01 1

+ 19 - 0
cde/programs/dtksh/ksh93/lib/package/ast-make.pkg

@@ -0,0 +1,19 @@
+ast-make :PACKAGE: \
+		nmake cpp probe 3d ksh93 coshell cs ss pax paxlib tw \
+		libast libardir libcmd libsum libdll libcoshell libpp
+
+:AUXILIARY: bin/proto bin/pax
+
+:LICENSE: *.open
+
+:COVERS: ast-ksh ast-ast
+
+:CATEGORY: devel libs shells
+
+:INDEX: ksh, pax, nmake
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-make package from AT&T Research
+	contains an almost minimal set of commands and libraries required
+	to run ast nmake. ksh, coshell, pax, tw, and the 3d user-level
+	filesystem are also included.

+ 20 - 0
cde/programs/dtksh/ksh93/lib/package/ast-open.pkg

@@ -0,0 +1,20 @@
+ast-open :PACKAGE: \
+		ksh93 kshlib pax html proto bzip libast libardir libcmd libdll \
+		libexpr libodelta librecsort libsum libuu libvdelta libbz \
+		libz tests 3d coshell cpp cs mam msgcc nmake probe ss \
+		libcoshell libcs libmam libpp libcodex paxlib codexlib \
+		at builtin codex dss dsslib ie mailx mam ncsl pack pzip \
+		re sort sortlib std tksh tw warp libdss libpz \
+		libtksh libtk vczip libvcodex libvgraph libtaso jcl libjcl
+
+:COVERS: ast-base ast-dss
+
+:LICENSE: *.open
+
+:CATEGORY: devel libs mail shells utils
+
+:INDEX: ksh, pax, nmake, sfio, and ast open source commands and libraries
+
+:DESCRIPTION:
+	The AT&T Software Technology ast-open package from AT&T Research
+	contains all of the ast open source commands and libraries.

+ 0 - 0
cde/programs/dtksh/ksh93/lib/package/ast-open.req


+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/ast-open.ver

@@ -0,0 +1 @@
+ast-open 2012-08-01 2012-08-01 1

+ 49 - 0
cde/programs/dtksh/ksh93/lib/package/ast.def

@@ -0,0 +1,49 @@
+#
+# ast default license info
+#
+
+message_set=3
+
+contributor+=(
+	[gsf]="Glenn Fowler <gsf@research.att.com>"
+	[dgk]="David Korn <dgk@research.att.com>"
+	[kpv]="Phong Vo <kpv@research.att.com>"
+
+	[aedgar]="Adam Edgar <aedgar@research.att.com>"
+	[alb]="Adam Buchsbaum <alb@adambuchsbaum.com>"
+	[ashaikh]="Aman Shaikh <ashaikh@research.att.com>"
+	[bala]="Bala Krishnamurthy <bala@research.att.com>"
+	[brussell]="Brian Russell <brussell@research.att.com>"
+	[chen]="Robin Chen <chen@research.att.com>"
+	[dfwc]="Don Caldwell <dfwc@research.att.com>"
+	[ek]="Lefty Koutsofios <ek@research.att.com>"
+	[gruber]="Bob Gruber <bob.gruber@gmail.com>"
+	[jiawang]="Jia Wang <jiawang@research.att.com>"
+	[jkf]="Jeff Fellin <jkf@research.att.com>"
+	[jlk]="Jeff Korn <@google.com>"
+	[kfisher]="Kathleen Fisher <kfisher@research.att.com>"
+	[kwc]="Ken Church <@microsoft.com>"
+
+	[bwk]="Brian Kernigham <bwk@research.bell-labs.com>"
+	[dmr]="Dennis Ritchie <dmr@research.bell-labs.com>"
+	[doug]="Doug McIlroy <doug@research.bell-labs.com>"
+	[ekrell]="Eduardo Krell <ekrell@adexus.cl>"
+	[jjs]="John Snyder <jjs@adexus.cl>"
+	[rao]="Herman Rao <rao@fareastone.att.com.tw>"
+
+	[ast-users]="AST users mailgroup <ast-users@research.att.com>"
+	[ast-developers]="AST developers mailgroup <ast-developers@research.att.com>"
+)
+
+license+=(
+	organization="Information and Software Systems Research"
+	domain=research.att.com
+	parent="AT&T"
+	corporation="Intellectual Property"
+	company="Research"
+	location="Florham Park NJ"
+
+	package=ast
+	since=1986
+	author=gsf+dgk+kpv
+)

+ 5 - 0
cde/programs/dtksh/ksh93/lib/package/ast.lic

@@ -0,0 +1,5 @@
+. ast.def
+. epl.def
+license+=(
+	start=2011
+)

+ 45 - 0
cde/programs/dtksh/ksh93/lib/package/bsd.def

@@ -0,0 +1,45 @@
+message_set=18
+
+contributor+=(
+	[bj]="Bill Joy"
+)
+
+license+=(
+	company="The Regents of the University of California"
+
+	package=BSD
+	since=1979
+
+	type=bsd
+	name="${license.package} Open Source"
+	url=http://www.opensource.org/licenses/bsd-license
+	urlmd5=5bfd485a7ffdb6249d1097da94ae75fc
+
+	notice='
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+1. Redistributions of source code must retain the above copyright
+   notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the above copyright
+   notice, this list of conditions and the following disclaimer in
+   the documentation and/or other materials provided with the
+   distribution.
+3. Neither the name of the University nor the names of its
+   contributors may be used to endorse or promote products derived
+   from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS
+OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGE.
+'
+)

+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/bsd.lic

@@ -0,0 +1 @@
+. bsd.def

+ 8 - 0
cde/programs/dtksh/ksh93/lib/package/epl.def

@@ -0,0 +1,8 @@
+license+=(
+	type=epl
+	id=eclipse
+	name="Eclipse Public License"
+	version=1.0
+	url=http://www.eclipse.org/org/documents/${license.type}-v${license.version//./}.html
+	urlmd5=b35adb5213ca9657e911e9befb180842
+)

+ 14 - 0
cde/programs/dtksh/ksh93/lib/package/ksh.pkg

@@ -0,0 +1,14 @@
+ksh :PACKAGE:
+
+:LICENSE: *.open
+
+:CATEGORY: shells
+
+:INDEX: standalone AT&T ksh executable
+
+:DESCRIPTION:
+	The AT&T Software Technology ksh package from AT&T Research
+	contains the AT&T ksh executable implemented by David Korn.
+	The download file is a gzipped ksh executable. If you want
+	to build ksh from the source then download one of the ast-ksh,
+	ast-base or ast-open packages.

+ 1537 - 0
cde/programs/dtksh/ksh93/lib/package/package.mk

@@ -0,0 +1,1537 @@
+/*
+ * source and binary package support
+ *
+ * @(#)package.mk (AT&T Research) 2012-02-14
+ *
+ * usage:
+ *
+ *	cd $INSTALLROOT/lib/package
+ *	nmake -f name [closure] [cyg|exp|lcl|pkg|rpm|tgz] [base|delta] type
+ *
+ * where:
+ *
+ *	name	package description file or component
+ *
+ *	type	source	build source archive, generates
+ *			$(PACKAGEDIR)/name.version.release.suffix
+ *		binary	build binary archive, generates
+ *			$(PACKAGEDIR)/name.version.hosttype.release.suffix
+ *		runtime	build binary archive, generates
+ *			$(PACKAGEDIR)/name-run.version.hosttype.release.suffix
+ *
+ * NOTE: $(PACKAGEDIR) is in the lowest view and is shared among all views
+ *
+ * generated archive member files are $(PACKAGEROOT) relative
+ *
+ * main assertions:
+ *
+ *	NAME [ name=value ] :PACKAGE: component ...
+ *	:OMIT: component ...
+ *	:LICENSE: license-class-pattern
+ *	:CATEGORY: category-id ...
+ *	:COVERS: package ...
+ *	:REQUIRES: package ...
+ *	:INDEX: index description line
+ *	:DESCRIPTION:
+ *		[ verbose description ]
+ *	:DETAILS: style
+ *		:README:
+ *			readme lines
+ *		:EXPORT:
+ *			name=value
+ *		target :INSTALL: [ source ]
+ *
+ * option variables, shown with default values
+ *
+ *	format=tgz
+ *		archive format
+ *
+ *	version=YYYY-MM-DD
+ *		package base version (overrides current date)
+ *
+ *	release=YYYY-MM-DD
+ *		package delta release (overrides current date)
+ *
+ *	license=type.class
+ *		:LICENSE: type.class pattern override
+ *
+ *	notice=1
+ *		include the conspicuous empty notice file
+ *
+ *	copyright=0
+ *		do not prepend source file copyright notice
+ *
+ *	strip=0
+ *		don't strip non-lcl binary package members
+ *
+ *	variants=pattern
+ *		include variants matching pattern in binary packages
+ *
+ *	incremental=[source:1 binary:0]
+ *		if a base archive is generated then also generate an
+ *		incremental delta archive from the previous base
+ *
+ * NOTE: the Makerules.mk :PACKAGE: operator defers to :package: when
+ *	 a target is specified
+ */
+
+/* these are ast centric -- we'll parameterize another day */
+
+org = ast
+url = http://www.research.att.com/sw/download
+
+/* generic defaults */
+
+base =
+category = utils
+checksum = md5
+closure =
+copyright = 1
+delta =
+format = tgz
+incremental =
+index =
+init = INIT
+license =
+licenses = $(org)
+mamfile = 1
+opt =
+name =
+notice =
+release =
+strip = 0
+style = tgz
+suffix = tgz
+type =
+variants = !(cc-g)
+vendor =
+version = $("":T=R%Y-%m-%d)
+
+SUM = sum
+
+package.notice = ------------ NOTICE -- LICENSED SOFTWARE -- SEE README FOR DETAILS ------------
+
+package.readme = $(@.package.readme.)
+
+.package.readme. :
+	This is a package root directory $PACKAGEROOT. Source and binary
+	packages in this directory tree are controlled by the command
+	$()
+		bin/package
+	$()
+	Binary files may be in this directory or in the install root directory
+	$()
+		INSTALLROOT=$PACKAGEROOT/arch/`bin/package`
+	$()
+	For more information run
+	$()
+		bin/package help
+	$()
+	Many of the packaged commands self-document via the --man and --html
+	options; those that do have no separate man page.
+	$()
+	Each package is covered by one of the license files
+	$()
+		$(PACKAGELIB)/LICENSES/<license>
+	$()
+	where <license> is the license type for the package.  At the top
+	of each license file is a URL; the license covers all software that
+	refers to this URL. For details run
+	$()
+		bin/package license [<package>]
+	$()
+	Any archives, distributions or packages made from source or
+	binaries covered by license(s) must contain the corresponding
+	license file(s)$(notice:?, this README file, and the empty file$$("\n")$$(package.notice)?.?)
+
+.package.licenses. : .FUNCTION
+	local I F L R T all save text
+	L := $(%)
+	while L == "--*"
+		I := $(L:O=1)
+		if I == "--all"
+			all = 1
+		elif I == "--save"
+			save = 1
+		elif I == "--text"
+			text = 1
+		end
+		L := $(L:O>1)
+	end
+	if "$(L)" == "*-*"
+		L += $(L:/[^-]*-//) $(L:/-.*//)
+	end
+	L += $(licenses)
+	for I $(L:U)
+		if I == "gpl"
+			I = gnu
+			all =
+		end
+		if F = "$(I:D=$(PACKAGESRC):B:S=.lic:T=F)"
+			R += $(F)
+			if save || text
+				T := $(.FIND. lib/package .lic $(F):P=W,query=type)
+				R += $(T:D=$(PACKAGESRC)/LICENSES:B)
+			end
+			if save
+				R += $(F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F)
+			elif ! all
+				break
+			end
+		end
+	end
+	return $(R)
+
+/*
+ * glob(3) doesn't handle / in alternation -- should it?
+ */
+
+.package.glob. : .FUNCTION
+	local A D I P S
+	for I $(%)
+		if I == "*/*"
+			D := $(I:C,/.*,,)
+			if ! "$(A:N=$(D))"
+				local S.$(D)
+				A += $(D)
+			end
+			S.$(D) += $(I:C,[^/]*/,,)
+		else
+			P := $(P)$(S)$(I)
+		end
+		S = |
+	end
+	if P == "*\|*"
+		P := ($(P))
+	end
+	for I $(A)
+		P += $(I)/$(.package.glob. $(S.$(I)))
+	end
+	return $(P)
+
+
+.MAKEINIT : .package.init
+
+.package.init : .MAKE .VIRTUAL .FORCE
+	local V
+	V := $(VROOT:T=F:P=L*)
+	if ! PACKAGEROOT
+	PACKAGEROOT := $(V:N!=*/arch/+([!/]):O=1)
+	end
+	if V == "$(PACKAGEROOT)"
+		V :=
+	end
+	V += $(INSTALLROOT) $(PACKAGEROOT)
+	PACKAGEVIEW := $(V:H=RU)
+	INSTALLOFFSET := $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+	if license
+		license := $(license)|none.none
+	end
+
+PACKAGELIB = lib/package
+PACKAGESRC = $(PACKAGEROOT)/$(PACKAGELIB)
+PACKAGEBIN = $(INSTALLROOT)/$(PACKAGELIB)
+PACKAGEDIR = $(PACKAGESRC)/$(style)
+INSTALLOFFSET = $(INSTALLROOT:C%$(PACKAGEROOT)/%%)
+
+package.omit = -|*/$(init)
+package.glob.all = $(INSTALLROOT)/src/*/*/($(MAKEFILES:/:/|/G))
+package.all = $(package.glob.all:P=G:W=O=$(?$(name):A=.VIRTUAL):N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.glob.pkg = $(.package.glob. $(~$(name):P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%) $(~$(name):P=U:N=$(name):?$$(INSTALLROOT)/src/$$(name)/($$(MAKEFILES:/:/|/G))??)
+package.pkg = $(package.glob.pkg:P=G:D:N!=$(package.omit):T=F:$(PACKAGEVIEW:C,.*,C;^&/;;,:/ /:/G):U)
+package.closure = $(closure:?$$(package.all)?$$(package.pkg)?)
+
+package.init = $(.package.glob. $("$(init)$(name)":P=U):C%.*%$(INSTALLROOT)/src/*/&/($(MAKEFILES:/:/|/G))%:P=G:T=F:D::B)
+package.ini = ignore mamprobe manmake package silent
+package.src.pat = $(PACKAGESRC)/($(name).(ini|pkg))
+package.src = $(package.src.pat:P=G) $(.package.licenses. --save $(name))
+package.bin = $(PACKAGEBIN)/$(name).ini
+
+package.mam = --never --force --mam=static --corrupt=accept --clobber --compare --link='lib*.a*' CC=$(CC.DIALECT:N=C++:?CC?cc?) package.license.class=$(license:Q) $(=) 'dontcare test' install test
+
+op = current
+stamp = [0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]
+source = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(suffix)
+binary = $(PACKAGEDIR)/$(name).$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+runtime = $(PACKAGEDIR)/$(name)-run.$(version)$(release:?.$(release)??).$(CC.HOSTTYPE).$(suffix)
+old.new.source = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(suffix)
+old.new.binary = $(PACKAGEDIR)/$(name).$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+old.new.runtime = $(PACKAGEDIR)/$(name)-run.$(version).$(old.version).$(CC.HOSTTYPE).$(suffix)
+
+source.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(suffix)":P=G:H=R)
+binary.list = $("$(PACKAGEDIR)/$(name).*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H=R)
+runtime.list = $("$(PACKAGEDIR)/$(name)-run.*$(stamp).$(CC.HOSTTYPE).$(suffix)":P=G:H>)
+
+source.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz.c":T=F)
+binary.ratz = $("$(INSTALLROOT)/src/cmd/$(init)/ratz":T=F)
+
+$(init) : .VIRTUAL $(init)
+
+package.requires = 0
+
+":package:" : .MAKE .OPERATOR
+	local P I R V
+	P := $(<:O=1)
+	$(P) : $(>:V)
+	if ! package.requires
+		if ! name
+			name := $(P)
+			.PACKAGE. := $(P)
+			if name == "$(init)"
+				package.omit = -
+				package.src += $(package.ini:C,^,$(PACKAGEROOT)/bin/,) $(PACKAGESRC)/package.mk
+			else
+				$(P) : $(package.init)
+			end
+			for I $(<:O>1)
+				if I == "*=*"
+					eval
+					$(I)
+					end
+				else
+					version := $(I)
+				end
+			end
+			LICENSEFILEDEFAULT := $(.package.licenses. $(name):@/ /:/G)
+			export LICENSEFILEDEFAULT
+		end
+		if "$(>)"
+			for I $(>:V)
+				$(I) : .VIRTUAL
+				if I == "/*"
+					package.dir += $(I:V)
+				end
+			end
+		end
+		if "$(@)"
+			$(P).README := $(@)
+		else
+			$(P).README := This is the $(P) package.
+		end
+	end
+
+":AUXILIARY:" : .MAKE .OPERATOR
+	package.auxiliary.$(style) += $(>:N=/*:T=F) $(>:N!=/*:C%^%$(INSTALLROOT)/%:T=F)
+
+":CATEGORY:" : .MAKE .OPERATOR
+	if ! package.requires
+		category := $(>)
+	end
+
+.covers. : .FUNCTION
+	local I C D F K=0 L
+	for I $(%)
+		if ! "$(~covers:N=$(I:B))"
+			if F = "$(I:D:B:S=.pkg:T=F)"
+				if D = "$(F:T=I)"
+					covers : $(I:B)
+					for L $(D)
+						if L == ":COVERS:"
+							K = 1
+						elif L == ":*:"
+							if K
+								break
+							end
+						elif K
+							: $(.covers. $(L))
+						end
+					end
+				end
+			else
+				error $(--exec:?3?1?) $(I): unknown package $(I)
+			end
+		end
+	end
+
+":COVERS:" : .MAKE .OPERATOR
+	if ! package.requires
+		: $(.covers. $(>))
+	end
+
+":DESCRIPTION:" : .MAKE .OPERATOR
+	if ! package.requires
+		$(name).README := $(@:V)
+	end
+
+":DETAILS:" : .MAKE .OPERATOR
+	if ! package.requires
+		details.$(>:O=1) := $(@:V)
+	end
+
+":EXPORT:" : .MAKE .OPERATOR
+	if ! package.requires
+		export.$(style) := $(@:/$$("\n")/ /G)
+	end
+
+":INDEX:" : .MAKE .OPERATOR
+	if ! package.requires
+		index := $(>)
+	end
+
+":INSTALL:" : .MAKE .OPERATOR
+	if ! package.requires
+		local T S F X
+		S := $(>)
+		T := $(<)
+		if "$(exe.$(style))" && "$(T)" == "bin/*([!./])"
+			T := $(T).exe
+		end
+		if ! "$(S)"
+			S := $(T)
+		elif "$(exe.$(style))" && "$(S)" == "bin/*([!./])"
+			S := $(S).exe
+		end
+		install.$(style) := $(install.$(style):V)$("\n")install : $$(ROOT)/$(T)$("\n")$$(ROOT)/$(T) : $$(ARCH)/$(S)$("\n\t")cp $< $@
+		if strip && "$(T:N=*.exe)"
+			install.$(style) := $(install.$(style):V)$("\n\t")strip $@ 2>/dev/null
+		end
+		X := $(PACKAGEROOT)/arch/$(CC.HOSTTYPE)/$(S)
+		if strip && "$(X:T=Y)" == "*/?(x-)(dll|exe)"
+			F := filter $(STRIP) $(STRIPFLAGS) $(X)
+		end
+		if "$(filter.$(style):V)"
+			filter.$(style) := $(filter.$(style):V)$$("\n")
+		end
+		filter.$(style) := $(filter.$(style):V);;$(F);$(X);usr/$(T)
+	end
+
+":LICENSE:" : .MAKE .OPERATOR
+	if ! package.requires && ! license
+		license := $(>)
+	end
+
+":OMIT:" : .MAKE .OPERATOR
+	if ! package.requires
+		package.omit := $(package.omit)|$(>:C,^,*/,:/ /|/G)
+	end
+
+":POSTINSTALL:" : .MAKE .OPERATOR
+	if ! package.requires
+		postinstall.$(style) := $(@:V)
+	end
+
+":README:" : .MAKE .OPERATOR
+	if ! package.requires
+		readme.$(style) := $(@:V)
+	end
+
+.requires. : .FUNCTION
+	local I C D F K=0 L V T M=0
+	for I $(%)
+		if ! "$(~requires:N=$(I:B))"
+			if F = "$(I:D:B:S=.pkg:T=F)"
+				if I == "$(init)"
+					package.omit = -
+				else
+					requires : $(I:B)
+				end
+				if V = "$(I:D:B=gen/$(I:B):S=.ver:T=F)"
+					req : $(I:B)
+				else
+					error 1 $(I): package should be written before $(P)
+				end
+				let package.requires = package.requires + 1
+				include "$(F)"
+				let package.requires = package.requires - 1
+			else
+				error 1 $(I): package not found
+			end
+		end
+	end
+
+":REQUIRES:" : .MAKE .OPERATOR
+	: $(.requires. $(>))
+
+":TEST:" : .MAKE .OPERATOR
+	if ! package.requires
+		local T
+		T := $(>)
+		if "$(T)" == "bin/*([!./])"
+			if "$(exe.$(style))"
+				T := $(T).exe
+			end
+			T := $$(PWD)/$$(ARCH)/$(T)
+		end
+		test.$(style) := $(test.$(style):V)$("\n")test : $(T:V)$("\n\t")$(@)
+	end
+
+base delta : .MAKE .VIRTUAL .FORCE
+	op := $(<)
+
+closure : .MAKE .VIRTUAL .FORCE
+	$(<) := 1
+
+cyg exp lcl pkg rpm tgz : .MAKE .VIRTUAL .FORCE
+	style := $(<)
+
+source : .source.init .source.gen .source.$$(style)
+
+.source.init : .MAKE
+	local A B D P V I
+	type := source
+	if ! "$(incremental)"
+		incremental = 1
+	end
+	if "$(source.$(name))"
+		suffix = c
+	end
+	: $(.init.$(style))
+	: $(details.$(style):V:R) :
+	A := $(source.list)
+	B := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+	P := $(A:N=*.$(stamp).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+	D := $(A:N=*.$(stamp).$(stamp).$(suffix):O=1:T=F)
+	if op == "delta"
+		if ! B
+			error 3 delta requires a base archive
+		end
+		base := -z $(B)
+		deltaversion := $(B:B:/$(name).//)
+		let deltasince = $(deltaversion:/.*-//) + 1
+		deltasince := $(deltaversion:/[^-]*$/$(deltasince:F=%02d)/)
+		if "$(release)" != "$(stamp)"
+			release := $("":T=R%Y-%m-%d)
+		end
+		source := $(B:D:B:S=.$(release).$(suffix))
+		version := $(source:B:B:/$(name).//)
+	elif B || op == "base"
+		if op == "base"
+			for I $(B) $(P)
+				V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+				if V == "$(stamp)" && V != "$(version)"
+					old.version := $(V)
+					old.source := $(I)
+					if "$(old.version)" >= "$(version)"
+						error 3 $(name): previous base $(old.version) is newer than $(version)
+					end
+					break
+				end
+			end
+		else
+			source := $(B)
+		end
+		if B == "$(source)"
+			if "$(B:D:B:B)" == "$(D:D:B:B)" && "$(B:B::S)" != "$(D:B::S)"
+				error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+			end
+			error 1 $(B:B:S): replacing current base
+		end
+		version := $(source:B:S:/^$(name).\(.*\).$(suffix)$/\1/)
+	end
+	PACKAGEGEN := $(PACKAGESRC)/gen
+
+.source.gen : $$(PACKAGEDIR) $$(PACKAGEGEN) $$(PACKAGEGEN)/SOURCE.html $$(PACKAGEGEN)/BINARY.html $$(PACKAGEGEN)/DETAILS.html
+
+BINPACKAGE := $(PATH:/:/ /G:X=package:T=F:O=1)
+
+$$(PACKAGEDIR) $$(PACKAGEGEN) : .IGNORE
+	[[ -d $(<) ]] || mkdir $(<)
+
+$$(PACKAGEGEN)/SOURCE.html : $(BINPACKAGE)
+	$(*) html source > $(<)
+
+$$(PACKAGEGEN)/BINARY.html : $(BINPACKAGE)
+	$(*) html binary > $(<)
+
+$$(PACKAGEGEN)/DETAILS.html : $(BINPACKAGE)
+	$(*) html intro > $(<)
+
+.source.exp .source.pkg .source.rpm : .MAKE
+	error 3 $(style): source package style not supported yet
+
+exe.cyg = .exe
+vendor.cyg = gnu
+
+.name.cyg : .FUNCTION
+	local N
+	N := $(%)
+	if N == "*-*"
+		vendor := $(N:/-.*//)
+		if vendor == "$(vendor.cyg)"
+			vendor :=
+			N := $(N:/[^-]*-//)
+		end
+		N := $(N:/-//G)
+	end
+	return $(N)
+
+.init.cyg : .FUNCTION
+	local N O
+	closure = 1
+	init = .
+	strip = 1
+	suffix = tar.bz2
+	format = tbz
+	vendor := $(licenses:N!=$(vendor.cyg):O=1)
+	package.ini := $(package.ini)
+	package.src.pat := $(package.src.pat)
+	package.src := $(package.src)
+	package.bin := $(package.bin)
+	.source.gen : .CLEAR $(*.source.gen:V:N!=*.html)
+	name.original := $(name)
+	name := $(.name.cyg $(name))
+	if name != "$(name.original)"
+		$(name) : $(~$(name.original))
+		O := $(~covers)
+		covers : .CLEAR
+		for N $(O)
+			covers : $(.name.cyg $(N))
+		end
+	end
+	stamp = [0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]-[0-9]
+	version.original := $(version)
+	version := $(version:/-//G)-1
+	if opt
+		opt := $(opt)/$(vendor)/
+	else
+		opt := $(name)-$(version)/
+	end
+	if type == "source"
+		version := $(version)-src
+		source = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+	else
+		binary = $(PACKAGEDIR)/$(name)-$(version)$(release:?.$(release)??).$(suffix)
+	end
+
+.source.cyg :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			integer m=0 o
+			cat > $tmp/configure <<'!'
+	echo "you didn't have to do that"
+	!
+			chmod +x $tmp/configure
+			echo ";;;$tmp/configure;configure"
+			cat > $tmp/Makefile0 <<'!'
+	HOSTTYPE := $$(shell bin/package)
+	ROOT = ../..
+	ARCH = arch/$$(HOSTTYPE)
+	all :
+		PACKAGEROOT= CYGWIN="$$CYGWIN ntsec binmode" bin/package make $(export.$(style))
+	install : all
+	$(install.$(style):V)
+	$(test.$(style):V)
+	!
+			echo ";;;$tmp/Makefile0;Makefile"
+			cat > $tmp/CYGWIN-README <<'!'
+	$(readme.$(style):@?$$(readme.$$(style))$$("\n\n")??)To build binaries from source into the ./arch/`bin/package` tree run:
+	$()
+		make
+	$()
+	$(test.$(style):@?To test the binaries after building/installing run:$$("\n\n\t")make test$$("\n\n")??)To build and/or install the binaries run:
+	$()
+		make install
+	$()
+	The bin/package command provides a command line interface for all package
+	operations. The $(opt:/.$//) source and binary packages were generated by:
+	$()
+		package write cyg base source version=$(version.original) $(name.original)
+		package write cyg base binary version=$(version.original) $(name.original)
+	$()
+	using the $(org)-base package. To download and install the latest
+	$(org)-base source package in /opt/$(org) run:
+	$()
+		PATH=/opt/$(org)/bin:$PATH
+		cd /opt/$(org)
+		package authorize "NAME" password "PASSWORD" setup flat source $("\\")
+			$(url) $("\\")
+			$(org)-base
+		package make
+	$()
+	and export /opt/$(org)/bin in PATH to use. The NAME and PASSWORD signify your
+	agreement to the software license(s). All users get the same NAME and PASSWORD.
+	See $(url) for details. If multiple architectures may be built under
+	/opt/$(org) then drop "flat" and export /opt/$(org)/arch/`package`/bin in PATH
+	to use. To update previously downloaded packages from the same url simply run:
+	$()
+		cd /opt/$(org)
+		package setup
+		package make
+	$()
+	To download and install the latest $(org)-base binary package in
+	/opt/$(org) change "source" to "binary" and omit "package make".
+	!
+			echo ";;;$tmp/CYGWIN-README;CYGWIN-PATCHES/README"
+			cat > $(source:/-src.$(suffix)//).setup.hint <<'!'
+	category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+	requires: cygwin
+	sdesc: "$(index)"
+	ldesc: "$($(name.original).README)"
+	!
+			echo ";;;$(source:/-src.$(suffix)//).setup.hint;CYGWIN-PATCHES/setup.hint"
+			echo ";;;$(BINPACKAGE);bin/package"
+			cat > $tmp/Makefile <<'!'
+	:MAKE:
+	!
+			echo ";;;$tmp/Makefile;src/Makefile"
+			echo ";;;$tmp/Makefile;src/cmd/Makefile"
+			echo ";;;$tmp/Makefile;src/lib/Makefile"
+			if	[[ '$(mamfile)' == 1 ]]
+			then	cat > $tmp/Mamfile1 <<'!'
+	info mam static
+	note source level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+				echo ";;;$tmp/Mamfile1;src/Mamfile"
+				cat > $tmp/Mamfile2 <<'!'
+	info mam static
+	note component level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+				echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+				echo ";;;$tmp/Mamfile2;src/lib/Mamfile"
+			fi
+			$(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+			echo ";;;$(PACKAGEGEN)/$(name.original).req"
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				if	[[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+				then	if	[[ '$(mamfile)' == 1 ]]
+					then	(( o=m ))
+						s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+						if	[[ $s ]]
+						then	for j in $s
+							do	if	[[ -d $j ]]
+								then	cd $j
+									if	[[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+									then	(( m++ ))
+										$(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+										echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+									fi
+									cd $(INSTALLROOT)/$i
+								fi
+							done
+							if	(( o != m ))
+							then	(( m++ ))
+								cat > $tmp/$m.mam <<'!'
+	info mam static
+	note subcomponent level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+								echo ";;;$tmp/$m.mam;$i/Mamfile"
+							fi
+						else	(( m++ ))
+							$(MAKE) $(package.mam) $(export.$(style):Q) > $tmp/$m.mam
+							echo ";;;$tmp/$m.mam;$i/Mamfile"
+						fi
+					fi
+					$(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q)
+				fi
+			done
+			set -- $(package.dir:P=G)
+			for i
+			do	tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+			done
+		} |
+		{
+			: > $tmp/HEAD
+			cat > $tmp/README <<'!'
+	$(package.readme)
+	!
+			echo ";;;$tmp/README;README"
+			sort -t';' -k5,5 -u
+			: > $tmp/TAIL
+			[[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			--format=$(format) \
+			--local \
+			-wvf $(source) $(base) \
+			$(PACKAGEVIEW:C%.*%-s",^&/,,"%) \
+			$(vendor:?-s",^[^/],$(opt)&,"??)
+		$(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+		rm -rf $tmp
+	fi
+
+.source.lcl :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			integer m=0 o
+			$(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				$(MAKE) --noexec $(-) $(=) .FILES.+=Mamfile recurse list.package.local
+			done
+			set -- $(package.dir:P=G)
+			for i
+			do	tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+			done
+		} |
+		sort -t';' -k5,5 -u |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			$(op:N=delta:??--format=$(format)?) \
+			--local \
+			-wvf $(source) $(base) \
+			$(op:N=delta:?--format=gzip??) \
+			$(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+		rm -rf $tmp
+	fi
+
+.source.tgz :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			integer m=0 o
+			if	[[ '$(init)' == '$(name)' ]]
+			then	cat > $tmp/Makefile <<'!'
+	:MAKE:
+	!
+				$(CMP) $(CMPFLAGS) $tmp/Makefile $(PACKAGEROOT)/src/Makefile && touch -r $(PACKAGEROOT)/src/Makefile $tmp/Makefile
+				echo ";;;$tmp/Makefile;src/Makefile"
+				cp $tmp/Makefile $tmp/Makefile1
+				$(CMP) $(CMPFLAGS) $tmp/Makefile1 $(PACKAGEROOT)/src/cmd/Makefile && touch -r $(PACKAGEROOT)/src/cmd/Makefile $tmp/Makefile1
+				echo ";;;$tmp/Makefile1;src/cmd/Makefile"
+				cp $tmp/Makefile $tmp/Makefile2
+				$(CMP) $(CMPFLAGS) $tmp/Makefile2 $(PACKAGEROOT)/src/lib/Makefile && touch -r $(PACKAGEROOT)/src/lib/Makefile $tmp/Makefile2
+				echo ";;;$tmp/Makefile2;src/lib/Makefile"
+				if	[[ '$(mamfile)' == 1 ]]
+				then	cat > $tmp/Mamfile1 <<'!'
+	info mam static
+	note source level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+					$(CMP) $(CMPFLAGS) $tmp/Mamfile1 $(PACKAGEROOT)/src/Mamfile && touch -r $(PACKAGEROOT)/src/Mamfile $tmp/Mamfile1
+					echo ";;;$tmp/Mamfile1;src/Mamfile"
+					cat > $tmp/Mamfile2 <<'!'
+	info mam static
+	note component level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+					$(CMP) $(CMPFLAGS) $tmp/Mamfile2 $(PACKAGEROOT)/src/cmd/Mamfile && touch -r $(PACKAGEROOT)/src/cmd/Mamfile $tmp/Mamfile2
+					echo ";;;$tmp/Mamfile2;src/cmd/Mamfile"
+					cp $tmp/Mamfile2 $tmp/Mamfile3
+					$(CMP) $(CMPFLAGS) $tmp/Mamfile3 $(PACKAGEROOT)/src/lib/Mamfile && touch -r $(PACKAGEROOT)/src/lib/Mamfile $tmp/Mamfile3
+					echo ";;;$tmp/Mamfile3;src/lib/Mamfile"
+				fi
+			fi
+			$(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+			if	[[ '$(~covers)' ]]
+			then	for i in $(~covers)
+				do	for j in lib pkg
+					do	if	[[ -f $(PACKAGESRC)/$i.$j ]]
+						then	echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+						fi
+					done
+					for j in ver req
+					do	if	[[ -f $(PACKAGEGEN)/$i.$j ]]
+						then	echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+						fi
+					done
+				done
+				for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+				do	echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+				done
+			fi
+			if	[[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+			then	echo $(name) $(version) $(release|version) 1 > $tmp/t
+				$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).ver || cp $tmp/t $(PACKAGEGEN)/$(name).ver
+				echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+				sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $tmp/t
+				$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).req || cp $tmp/t $(PACKAGEGEN)/$(name).req
+				echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+				{
+					echo "name='$(name)'"
+					echo "index='$(index)'"
+					echo "covers='$(~covers)'"
+					echo "requires='$(~req)'"
+				} > $tmp/t
+				$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).inx || cp $tmp/t $(PACKAGEGEN)/$(name).inx
+				{
+					{
+					echo '$($(name).README)'
+					if	[[ '$(~covers)' ]]
+					then	echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+					fi
+					if	[[ '$(~requires)' ]]
+					then	echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+					fi
+					} | fmt
+					package help source
+					package release $(name)
+				} > $tmp/t
+				$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).README || cp $tmp/t $(PACKAGEGEN)/$(name).README
+				echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+				{
+					echo '.xx title="$(name) package"'
+					echo '.xx meta.description="$(name) package"'
+					echo '.xx meta.keywords="software, package"'
+					echo '.MT 4'
+					echo '.TL'
+					echo '$(name) package'
+					echo '.H 1 "$(name) package"'
+					echo '$($(name).README)'
+					set -- $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F:D::B)
+					hot=
+					for i
+					do	hot="$hot -e s/\\(\\<$i\\>\\)/\\\\h'0*1'\\1\\\\h'0'/"
+					done
+					set -- $(package.closure:B)
+					if	(( $# ))
+					then	echo 'Components in this package:'
+						echo '.P'
+						echo '.TS'
+						echo 'center expand;'
+						echo 'l l l l l l.'
+						if	[[ $hot ]]
+						then	hot="sed $hot"
+						else	hot=cat
+						fi
+						for i
+						do	echo $i
+						done |
+						pr -6 -t -s'	' |
+						$hot
+						echo '.TE'
+					fi
+					echo '.P'
+					if	[[ '$(~covers)' ]]
+					then	echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+					fi
+					if	[[ '$(~requires)' ]]
+					then	echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+					fi
+					set -- $(.package.licenses. --all $(name))
+					case $# in
+					0)	;;
+					*)	case $# in
+						1)	echo 'The software is covered by this license:' ;;
+						*)	echo 'The software is covered by these licenses:' ;;
+						esac
+						echo .BL
+						for j
+						do	i=$( $(PROTO) -l $j -p -h -o type=usage /dev/null | sed -e 's,.*\[-license?\([^]]*\).*,\1,' )
+							echo .LI
+							echo ".xx link=\"$i\""
+						done
+						echo .LE
+						echo 'Individual components may be covered by separate licenses;'
+						echo 'refer to the component source and/or binaries for more information.'
+						echo .P
+						;;
+					esac
+					echo 'A recent'
+					echo '.xx link="release change log"'
+					echo 'is also included.'
+					cat $(package.closure:C,.*,$(INSTALLROOT)/&/PROMO.mm,:T=F) < /dev/null
+					echo '.H 1 "release change log"'
+					echo '.xx index'
+					echo '.nf'
+					package release $(name) |
+					sed -e 's/:::::::: \(.*\) ::::::::/.fi\$("\n").H 1 "\1 changes"\$("\n").nf/'
+					echo '.fi'
+				} |
+				$(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+				$(STDED) $(STDEDFLAGS) $tmp/t <<'!'
+	/^<!--LABELS-->$/,/^<!--\/LABELS-->$/s/ changes</</
+	/^<!--LABELS-->$/,/^<!--\/LABELS-->$/m/<A name="release change log">/
+	w
+	q
+	!
+				$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).html || cp $tmp/t $(PACKAGEGEN)/$(name).html
+				echo ";;;$(PACKAGEGEN)/$(name).html;$(PACKAGELIB)/$(name).html"
+				if	[[ '$(deltasince)' ]]
+				then	{
+					echo '.xx title="$(name) package"'
+					echo '.xx meta.description="$(name) package $(version) delta $(release)"'
+					echo '.xx meta.keywords="software, package, delta"'
+					echo '.MT 4'
+					echo '.TL'
+					echo '$(name) package $(deltaversion) delta $(release)'
+					echo '.H 1 "$(name) package $(deltaversion) delta $(release) changes"'
+					echo '.nf'
+					package release $(deltasince) $(name) |
+					sed -e 's/:::::::: \(.*\) ::::::::/.H 2 \1/'
+					echo '.fi'
+					} |
+					$(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $tmp/t
+					$(CMP) $(CMPFLAGS) $tmp/t $(PACKAGEGEN)/$(name).$(release).html || cp $tmp/t $(PACKAGEGEN)/$(name).$(release).html
+					echo ";;;$(PACKAGEGEN)/$(name).$(release).html;$(PACKAGELIB)/$(name).$(release).html"
+				fi
+			fi
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				if	[[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+				then	if	[[ '$(mamfile)' == 1 ]]
+					then	(( o=m ))
+						s=$( $(MAKE) --noexec --recurse=list recurse 2>/dev/null )
+						if	[[ $s ]]
+						then	for j in $s
+							do	if	[[ -d $j ]]
+								then	cd $j
+									if	[[ ! '$(license)' ]] || $(MAKE) --noexec --silent 'exit $$(LICENSECLASS:N=$(license):?0?1?)' .
+									then	(( m++ ))
+										$(MAKE) $(package.mam) > $tmp/$m.mam
+										$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/$j/Mamfile && touch -r $(PACKAGEROOT)/$i/$j/Mamfile $tmp/$m.mam
+										echo ";;;$tmp/$m.mam;$i/$j/Mamfile"
+									fi
+									cd $(INSTALLROOT)/$i
+								fi
+							done
+							if	(( o != m ))
+							then	(( m++ ))
+								cat > $tmp/$m.mam <<'!'
+	info mam static
+	note subcomponent level :MAKE: equivalent
+	make install
+	make all
+	exec - ${MAMAKE} -r '*' ${MAMAKEARGS}
+	done all virtual
+	done install virtual
+	!
+								$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+								echo ";;;$tmp/$m.mam;$i/Mamfile"
+							fi
+						else	(( m++ ))
+							$(MAKE) $(package.mam) > $tmp/$m.mam
+							$(CMP) $(CMPFLAGS) $tmp/$m.mam $(PACKAGEROOT)/$i/Mamfile && touch -r $(PACKAGEROOT)/$i/Mamfile $tmp/$m.mam
+							echo ";;;$tmp/$m.mam;$i/Mamfile"
+						fi
+					fi
+					$(MAKE) --noexec $(-) $(=) recurse list.package.$(type) package.license.class=$(license:Q) $(copyright:N=1:??LICENSE=?)
+				fi
+			done
+			set -- $(package.dir:P=G)
+			for i
+			do	tw -d $i -e "action:printf(';;;%s;%s\n',path,path);"
+			done
+		} |
+		{
+			: > $tmp/HEAD
+			[[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+			cat > $tmp/README <<'!'
+	$(package.readme)
+	!
+			echo ";;;$tmp/README;README"
+			$(CMP) $(CMPFLAGS) $tmp/README $(PACKAGEROOT)/README && touch -r $(PACKAGEROOT)/README $tmp/README
+			sort -t';' -k5,5 -u
+			: > $tmp/TAIL
+			[[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			$(op:N=delta:??--format=$(format)?) \
+			--local \
+			-wvf $(source) $(base) \
+			$(op:N=delta:?--format=gzip??) \
+			$(PACKAGEVIEW:C%.*%-s",^&/,,"%)
+		$(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+		echo local > $(source:D:B=$(name):S=.tim)
+		if	[[ '$(incremental)' == 1 && '$(old.source)' ]]
+		then	$(PAX) -rf $(source) -wvf $(old.new.source) -z $(old.source)
+			$(SUM) -x $(checksum) < $(old.new.source) > $(old.new.source:D:B:S=.$(checksum))
+		fi
+		rm -rf $tmp
+	else	if	[[ '$(old.source)' ]] && $(CMP) $(CMPFLAGS) $(source.$(name)) $(source)
+		then	: $(name) is up to date
+		else	echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+			: > $(PACKAGEGEN)/$(name).req
+			{
+				echo "name='$(name)'"
+				echo "index='$(index)'"
+				echo "covers='$(~covers)'"
+				echo "requires='$(~req)'"
+			} > $(PACKAGEGEN)/$(name).inx
+			{
+				echo '.xx title="$(name) package"'
+				echo '.xx meta.description="$(name) package"'
+				echo '.xx meta.keywords="software, package"'
+				echo '.MT 4'
+				echo '.TL'
+				echo '$(name) package'
+				echo '.H 1'
+				echo '$($(name).README)'
+			} |
+			$(MM2HTML) $(MM2HTMLFLAGS) -o nohtml.ident > $(PACKAGEGEN)/$(name).html
+			if	[[ '$(source.$(name))' ]]
+			then	{
+					echo '$($(name).README)'
+					package help source
+				} > $(PACKAGEGEN)/$(name).README
+				cp $(source.$(name)) $(source)
+				$(SUM) -x $(checksum) < $(source) > $(source:D:B:S=.$(checksum))
+			fi
+			echo local > $(source:D:B=$(name):S=.tim)
+		fi
+	fi
+
+binary : .binary.init .binary.gen .binary.$$(style)
+
+.binary.init : .MAKE
+	local A B D I P V
+	type := binary
+	if ! "$(incremental)"
+		incremental = 0
+	end
+	if ! "$(~$(name))"
+		if name == "ratz"
+			suffix = exe
+		else
+			suffix = gz
+		end
+	end
+	: $(.init.$(style)) :
+	: $(details.$(style):V:R) :
+	A := $(binary.list)
+	B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+	P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+	D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+	if op == "delta"
+		if ! B
+			error 3 delta requires a base archive
+		end
+		base := -z $(B)
+		if "$(release)" != "$(stamp)"
+			release := $("":T=R%Y-%m-%d)
+		end
+		binary := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+		version := $(binary:B:B:/$(name).//)
+	elif B || op == "base"
+		if op == "base"
+			for I $(B) $(P)
+				V := $(I:B:/$(name)\.\([^.]*\).*/\1/)
+				if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+					old.version := $(V)
+					old.binary := $(I)
+					if "$(old.version)" >= "$(version)"
+						error 3 $(name): previous base $(old.version) is newer than $(version)
+					end
+					break
+				end
+			end
+		else
+			binary := $(B)
+		end
+		if B == "$(binary)"
+			if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+				error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+			end
+			error 1 $(B:B:S): replacing current base
+		end
+		version := $(binary:B:/$(name).//:/\..*//)
+	end
+	PACKAGEGEN := $(PACKAGEBIN)/gen
+
+.binary.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.binary.exp .binary.pkg .binary.rpm : .MAKE
+	error 3 $(style): binary package style not supported yet
+
+.binary.cyg :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			integer m=0 o
+			{
+				echo '$($(name.original).README)' | fmt
+				cat <<'!'
+	$(readme.$(style):@?$$("\n")$$(readme.$$(style))??)
+	!
+			} > $tmp/README1
+			echo ";;;$tmp/README1;usr/share/doc/Cygwin/$(opt:/.$//).README"
+			{
+				echo '$($(name.original).README)' | fmt
+				cat <<'!'
+	$()
+	The remainder of this file is the README from the source package
+	that was used to generate this binary package. It describes
+	the source build hierarchy, not the current directory.
+	$()
+	$(package.readme)
+	!
+			} > $tmp/README2
+			echo ";;;$tmp/README2;usr/share/doc/$(opt)README"
+			package release $(name.original) > $tmp/RELEASE
+			echo ";;;$tmp/RELEASE;usr/share/doc/$(opt)RELEASE"
+			cat > $(binary:/.$(suffix)//).setup.hint <<'!'
+	category: $(category:/\(.\).*/\1/U)$(category:/.\(.*\)/\1/L)
+	requires: cygwin
+	sdesc: "$(index)"
+	ldesc: "$($(name.original).README)"
+	!
+			set -- $(.package.licenses. --text $(name.original):N!=*.lic)
+			for i
+			do	echo ";;;${i};usr/share/doc/$(opt)LICENSE-${i##*/}"
+			done
+			cat <<'!'
+	$(filter.$(style))
+	!
+			if	[[ '$(postinstall.$(style):V:O=1:?1??)' ]]
+			then	cat >$tmp/postinstall <<'!'
+	$("#")!/bin/sh
+	$(postinstall.$(style))
+	!
+				echo ";;;$tmp/postinstall;etc/postinstall/$(name).sh"
+			fi
+		} |
+		{
+			: > $tmp/HEAD
+			[[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+			sort -t';' -k5,5 -u
+			: > $tmp/TAIL
+			[[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			--format=$(format) \
+			--local \
+			-wvf $(binary)
+		$(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+		rm -rf $tmp
+	fi
+
+.binary.lcl :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			$(package.src:U:T=F:/.*/echo ";;;&"$("\n")/)
+			$(package.bin:U:T=F:/.*/echo ";;;&"$("\n")/)
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				$(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+			done
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			$(op:N=delta:??--format=$(format)?) \
+			--local \
+			--checksum=md5:$(PACKAGEGEN)/$(name).sum \
+			--install=$(PACKAGEGEN)/$(name).ins \
+			-wvf $(binary) $(base) \
+			$(op:N=delta:?--format=gzip??) \
+			-s",^$tmp/,$(INSTALLOFFSET)/," \
+			$(PACKAGEROOT:C%.*%-s",^&/,,"%)
+		$(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+		echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+		rm -rf $tmp
+	fi
+
+.binary.tgz :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			if	[[ '$(init)' == '$(name)' ]]
+			then	for i in lib32 lib64
+				do	if	[[ -d $(INSTALLROOT)/$i ]]
+					then	echo ";physical;;$(INSTALLROOT)/$i"
+					fi
+				done
+			fi
+			$(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+			$(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+			$(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+			if	[[ '$(PACKAGEDIR:B)' == '$(style)' ]]
+			then	echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+				echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+				if	[[ '$(~covers)' ]]
+				then	for i in $(~covers)
+					do	for j in lic pkg
+						do	if	[[ -f $(PACKAGESRC)/$i.$j ]]
+							then	echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+							fi
+						done
+						for j in ver req
+						do	if	[[ -f $(PACKAGEGEN)/$i.$j ]]
+							then	echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+							fi
+						done
+					done
+					for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+					do	echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+					done
+				fi
+				sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+				echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+				{
+					echo "name='$(name)'"
+					echo "index='$(index)'"
+					echo "covers='$(~covers)'"
+					echo "requires='$(~req)'"
+				} > $(PACKAGEGEN)/$(name).inx
+				{
+					{
+					echo '$($(name).README)'
+					if	[[ '$(~covers)' ]]
+					then	echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+					fi
+					if	[[ '$(~requires)' ]]
+					then	echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+					fi
+					} | fmt
+					package help binary
+					package release $(name)
+				} > $(PACKAGEGEN)/$(name).README
+				echo ";;;$(PACKAGEGEN)/$(name).README;$(PACKAGELIB)/$(name).README"
+			fi
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				$(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+			done
+		} |
+		{
+			: > $tmp/HEAD
+			[[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+			cat > $tmp/README <<'!'
+	$(package.readme)
+	!
+			echo ";;;$tmp/README;README"
+			sort -t';' -k5,5 -u
+			: > $tmp/TAIL
+			[[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			$(op:N=delta:??--format=$(format)?) \
+			--local \
+			--checksum=md5:$(PACKAGEGEN)/$(name).sum \
+			--install=$(PACKAGEGEN)/$(name).ins \
+			-wvf $(binary) $(base) \
+			$(op:N=delta:?--format=gzip??) \
+			-s",^$tmp/,$(INSTALLOFFSET)/," \
+			$(PACKAGEROOT:C%.*%-s",^&/,,"%)
+		echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		$(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+		echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+		if	[[ '$(incremental)' == 1 && '$(old.binary)' ]]
+		then	$(PAX) -rf $(binary) -wvf $(old.new.binary) -z $(old.binary)
+			echo $(old.new.binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+			$(SUM) -x $(checksum) < $(old.new.binary) > $(old.new.binary:D:B:S=.$(checksum))
+			echo $(old.new.binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		fi
+		rm -rf $tmp
+	else	if	[[ '$(binary.$(name))' ]]
+		then	exe=$(binary.$(name))
+		else	exe=$(INSTALLROOT)/bin/$(name)
+		fi
+		if	[[ '$(old.binary)' ]] && $(CMP) $(CMPFLAGS) $exe $(binary)
+		then	: $(name) is up to date
+		else	echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+			: > $(PACKAGEGEN)/$(name).req
+			{
+				echo "name='$(name)'"
+				echo "index='$(index)'"
+				echo "covers='$(~covers)'"
+				echo "requires='$(~req)'"
+			} > $(PACKAGEGEN)/$(name).inx
+			{
+				echo '$($(name).README)'
+				package help binary
+			} > $(PACKAGEGEN)/$(name).README
+			case "$(binary)" in
+			*.gz)	gzip < $exe > $(binary) ;;
+			*)	cp $exe $(binary) ;;
+			esac
+			$(SUM) -x $(checksum) < $(binary) > $(binary:D:B:S=.$(checksum))
+			echo local > $(binary:D:B=$(name):S=.$(CC.HOSTTYPE).tim)
+		fi
+		echo $(binary) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		echo $(binary:D:B:S=.$(checksum)) >> $(binary:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+	fi
+
+runtime : .runtime.init .runtime.gen .runtime.$$(style)
+
+.runtime.init : .MAKE
+	local A B D I P V
+	type := runtime
+	if ! "$(incremental)"
+		incremental = 0
+	end
+	if ! "$(~$(name))"
+		if name == "ratz"
+			suffix = exe
+		else
+			suffix = gz
+		end
+	end
+	: $(.init.$(style)) :
+	: $(details.$(style):V:R) :
+	A := $(runtime.list)
+	B := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=1:T=F)
+	P := $(A:N=*.$(stamp).$(CC.HOSTTYPE).$(suffix):N!=*.$(stamp).$(stamp).*:O=2:T=F)
+	D := $(A:N=*.$(stamp).$(stamp).$(CC.HOSTTYPE).$(suffix):O=1:T=F)
+	if op == "delta"
+		if ! B
+			error 3 delta requires a base archive
+		end
+		base := -z $(B)
+		if "$(release)" != "$(stamp)"
+			release := $("":T=R%Y-%m-%d)
+		end
+		runtime := $(B:/$(CC.HOSTTYPE).$(suffix)$/$(release).&/)
+		version := $(runtime:B:B:/$(name).//)
+	elif B || op == "base"
+		if op == "base"
+			for I $(B) $(P)
+				V := $(I:B:/$(name)-run\.\([^.]*\).*/\1/)
+				if V == "[0-9][0-9][0-9][0-9]-[0-9][0-9]-[0-9][0-9]" && V != "$(version)"
+					old.version := $(V)
+					old.runtime := $(I)
+					if "$(old.version)" >= "$(version)"
+						error 3 $(name): previous base $(old.version) is newer than $(version)
+					end
+					break
+				end
+			end
+		else
+			runtime := $(B)
+		end
+		if B == "$(runtime)"
+			if "$(B:D:B)" == "$(D:D:B)" && "$(B:S)" != "$(D:S)"
+				error 3 $(B:B:S): base overwrite would invalidate delta $(D:B:S)
+			end
+			error 1 $(B:B:S): replacing current base
+		end
+		version := $(runtime:B:/$(name)-run.//:/\..*//)
+	end
+	PACKAGEGEN := $(PACKAGESRC)/gen
+
+.runtime.gen : $$(PACKAGEDIR) $$(PACKAGEGEN)
+
+.runtime.cyg .runtime.exp .runtime.lcl .runtime.pkg .runtime.rpm : .MAKE
+	error 3 $(style): runtime package style not supported yet
+
+.runtime.tgz :
+	if	[[ '$(~$(name))' ]]
+	then	tmp=/tmp/pkg$(tmp)
+		mkdir $tmp
+		{
+			if	[[ '$(init)' == '$(name)' ]]
+			then	for i in lib32 lib64
+				do	if	[[ -d $(INSTALLROOT)/$i ]]
+					then	echo ";physical;;$(INSTALLROOT)/$i"
+					fi
+				done
+			fi
+			$(package.src:U:T=F:C%^$(PACKAGEROOT)/%%:C%.*%echo ";;;$(PACKAGEROOT)/&;&"$("\n")%)
+			$(package.bin:U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+			$(package.auxiliary.$(style):U:T=F:C%^$(INSTALLROOT)/%%:C%.*%echo ";;;$(INSTALLROOT)/&;&"$("\n")%)
+			echo $(name) $(version) $(release|version) 1 > $(PACKAGEGEN)/$(name).ver
+			echo ";;;$(PACKAGEGEN)/$(name).ver;$(PACKAGELIB)/$(name).ver"
+			if	[[ '$(~covers)' ]]
+			then	for i in $(~covers)
+				do	for j in lic pkg
+					do	if	[[ -f $(PACKAGESRC)/$i.$j ]]
+						then	echo ";;;$(PACKAGESRC)/$i.$j;$(PACKAGELIB)/$i.$j"
+						fi
+					done
+					for j in ver req
+					do	if	[[ -f $(PACKAGEGEN)/$i.$j ]]
+						then	echo ";;;$(PACKAGEGEN)/$i.$j;$(PACKAGELIB)/$i.$j"
+						fi
+					done
+				done
+				for i in $(~covers:D=$(PACKAGESRC):B:S=.lic:T=F:T=I:N=*.def:D=$(PACKAGESRC):B:S:T=F:B:S)
+				do	echo ";;;$(PACKAGESRC)/$i;$(PACKAGELIB)/$i"
+				done
+			fi
+			sed 's,1$,0,' $(~req:D=$(PACKAGEGEN):B:S=.ver:T=F) < /dev/null > $(PACKAGEGEN)/$(name).req
+			echo ";;;$(PACKAGEGEN)/$(name).req;$(PACKAGELIB)/$(name).req"
+			{
+				echo "name='$(name)'"
+				echo "index='$(index)'"
+				echo "covers='$(~covers)'"
+				echo "requires='$(~req)'"
+			} > $(PACKAGEGEN)/$(name).inx
+			{
+				{
+				echo '$($(name).README)'
+				if	[[ '$(~covers)' ]]
+				then	echo
+					echo "This package is a superset of the following package$(~covers:O=2:?s??): $(~covers); you won't need $(~covers:O=2:?these?this?) if you download $(name)."
+				fi
+				if	[[ '$(~requires)' ]]
+				then	echo
+					echo 'It requires the following package$(~requires:O=2:?s??): $(~requires).'
+				fi
+				echo
+				echo "To install this $(type) package read the tarball into a directory"
+				echo "suitable for containing bin and lib subdirectories, and run the"
+				echo "$(PACKAGELIB)/gen/$(name)-run.ins script to fix up permissions."
+				echo
+				echo "To use the package export the bin directory in PATH. The commands and"
+				echo "libraries use \$PATH to locate dynamic libraries and related data files."
+				echo
+				} | fmt
+			} > $(PACKAGEGEN)/$(name)-run.README
+			echo ";;;$(PACKAGEGEN)/$(name)-run.README;$(PACKAGELIB)/$(name)-run.README"
+			set -- $(package.closure)
+			for i
+			do	cd $(INSTALLROOT)/$i
+				$(MAKE) --noexec $(-) --variants=$(variants:Q) $(=) package.strip=$(strip) recurse list.package.$(type) package.license.class=$(license:Q) cc-
+			done
+		} |
+		{
+			: > $tmp/HEAD
+			[[ '$(notice)' ]] && echo ";;;$tmp/HEAD;$(package.notice)"
+			cat > $tmp/README <<'!'
+	$(package.readme)
+	!
+			echo ";;;$tmp/README;README"
+			sort -t';' -k5,5 -u
+			: > $tmp/TAIL
+			[[ '$(notice)' ]] && echo ";;;$tmp/TAIL;$(package.notice)"
+		} |
+		$(PAX)	--filter=- \
+			--to=ascii \
+			$(op:N=delta:??--format=$(format)?) \
+			--local \
+			--checksum=md5:$(PACKAGEGEN)/$(name)-run.sum \
+			--install=$(PACKAGEGEN)/$(name)-run.ins \
+			-wvf $(runtime) $(base) \
+			$(op:N=delta:?--format=gzip??) \
+			-s",^$tmp/,$(INSTALLOFFSET)/," \
+			$(PACKAGEROOT:C%.*%-s",^&/,,"%)
+		echo $(runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		$(SUM) -x $(checksum) < $(runtime) > $(runtime:D:B:S=.$(checksum))
+		echo $(runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		echo local > $(runtime:D:B=$(name)-run:S=.$(CC.HOSTTYPE).tim)
+		if	[[ '$(incremental)' == 1 && '$(old.runtime)' ]]
+		then	$(PAX) -rf $(runtime) -wvf $(old.new.runtime) -z $(old.runtime)
+			echo $(old.new.runtime) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+			$(SUM) -x $(checksum) < $(old.new.runtime) > $(old.new.runtime:D:B:S=.$(checksum))
+			echo $(old.new.runtime:D:B:S=.$(checksum)) >> $(runtime:D:B=PACKAGE:S=.$(CC.HOSTTYPE).lst)
+		fi
+		rm -rf $tmp
+	fi
+
+list.installed list.manifest :
+	set -- $(package.closure)
+	for i
+	do	cd $(INSTALLROOT)/$i
+		ignore $(MAKE) --noexec $(-) $(=) $(<)
+	done

+ 39 - 0
cde/programs/dtksh/ksh93/lib/package/zlib.def

@@ -0,0 +1,39 @@
+message_set=20
+
+contributor+=(
+	[jlg]="Jean-loup Gailly"
+	[ma]="Mark Adler"
+)
+
+license+=(
+	company="Jean-loup Gailly and Mark Adler"
+
+	package=zlib
+	since=1995
+
+	type=zlib
+	name="${license.package} Open Source"
+	url=http://www.opensource.org/licenses/Zlib
+	urlmd5=4cfd2c17b0340c2f3c80b577a8e45bee
+
+	notice='
+This software is provided "as-is", without any express or implied
+warranty. In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+   claim that you wrote the original software. If you use this software
+   in a product, an acknowledgment in the product documentation would
+   be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and must not
+   be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+   distribution.
+'
+)

+ 1 - 0
cde/programs/dtksh/ksh93/lib/package/zlib.lic

@@ -0,0 +1 @@
+. zlib.def

+ 16 - 0
cde/programs/dtksh/ksh93/src/Mamfile

@@ -0,0 +1,16 @@
+info mam static
+note *
+note * This build file is in the Make Abstract Machine (MAM) language. It was
+note * first generated by nmake, but in the ksh 93u+m distribution we maintain
+note * it manually because nmake had too many problems to keep using. The
+note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added
+note * support for indentation to improve readability. The language is
+note * documented in Glenn Fowler's paper "A Make Abstract Machine":
+note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html
+note *
+note source level :MAKE: equivalent
+make install
+	make all
+		exec - ${MAMAKE} -r '*/*' ${MAMAKEARGS}
+	done all virtual
+done install virtual

+ 870 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/C+probe

@@ -0,0 +1,870 @@
+:
+### this script contains archaic constructs that work with all sh variants ###
+# Glenn Fowler
+# AT&T Research
+#
+# @(#)C probe (AT&T Research) 2012-02-29
+#
+# probe [ -d ] c-compiler-path [ attributes ]
+#
+# common C probe preamble for the tool specific probes
+#
+# NOTE: some cc -E's do syntax analysis!
+
+#
+# probe_* are first eval'd and then attempted from left to right
+#
+
+probe_binding="-dy -dn -Bdynamic -Bstatic '-Wl,-ashared -Wl,+s' -Wl,-aarchive -call_shared -non_shared -dynamic -static -bshared -bstatic '' -static"
+probe_env="CC_OPTIONS CCOPTS LD_OPTIONS LDOPTS LIBPATH LPATH"
+probe_include="stdio.h iostream.h complex.h ctype.h plot.h stdarg.h varargs.h ranlib.h hash.h sys/types.h stab.h cmath cstdio iostream string"
+probe_longlong="long 'long long'"
+probe_longlong_t="__int64_t _int64_t __int64 _int64 int64"
+probe_l="l yyreject m sin mopt sin"
+probe_lxx="C exit ++ exit g++ exit"
+probe_ppprefix="a n"
+probe_size="size"
+probe_src="cxx C cc c"
+probe_sa=".sa"
+probe_sd=".dll .lib .dll .x"
+probe_sdb=".pdb"
+probe_so=".dylib .so .sl"
+probe_symprefix="_"
+probe_verbose="'-v -v' '-# -#' '-d -d' -dryrun '-V -V'"
+probe_version="--version -V -version -v"
+
+#
+# the following are set by the preamble for the tool specific probe
+#
+
+cc=cc
+debug=
+dir=.
+dll=.dll
+dynamic=
+exe=exe
+executable="test -x"
+hosted=
+ifs=${IFS-'
+	 '}
+obj=o
+ppenv=
+ppopt=
+predef=
+prepred=
+sa=
+sd=
+sdb=
+so=
+sov=
+static=
+stdlib=
+stdpp=
+suffix_command=
+if	test "" != "$TMPDIR" -a -d "$TMPDIR"
+then	tmpdir=$TMPDIR
+else	tmpdir=/tmp
+fi
+tmpdir=$tmpdir/probe$$
+undef="define defined elif else endif error if ifdef ifndef include line pragma undef __STDC__ __STDPP__ __ARGC__ __BASE__ __BASE_FILE__ __DATE__ __FILE__ __FUNCTION__ __INCLUDE_LEVEL__ __LINE__ __PATH__ __TIME__ __TIMESTAMP__ __VERSION__"
+version_flags=
+version_stamp=
+version_string=
+
+#
+# constrain the environment
+#
+
+DISPLAY=
+LC_ALL=C
+export DISPLAY LC_ALL
+
+#
+# now the common probes
+#
+
+while	:
+do	case $1 in
+	-d)	debug=1 ;;
+	-*)	set ''; break ;;
+	*)	break ;;
+	esac
+	shift
+done
+
+cc=$1
+case $cc in
+[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*)
+	;;
+*)	echo "Usage: $0 [ -d ] c-compiler-path [ attributes ]" >&2
+	exit 1
+	;;
+esac
+ATTRIBUTES=
+eval $2
+_probe_PATH=$PATH
+PATH=/usr/bin:/bin:$PATH
+
+case $0 in
+*[\\/]*)	dir=`echo $0 | sed -e 's,[\\/][\\/]*[^\\/]*\$,,'` ;;
+esac
+
+$executable . 2>/dev/null || executable='test -r'
+
+case $SHELL in
+[\\/]*|[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\*)
+	sh=$SHELL
+	;;
+*)	sh=/bin/sh
+	;;
+esac
+
+trap 'code=$?; cd ..; rm -rf $tmpdir; exit $code' 0 1 2 3
+mkdir $tmpdir
+cd $tmpdir
+
+exec 3>&1 4>&2 </dev/null
+case $debug in
+"")	exec >/dev/null 2>&1
+	(ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0
+	;;
+*)	PS4='+$LINENO+ '
+	set -x
+	;;
+esac
+
+if	(xxx=xxx; unset xxx)
+then	UNSET=1
+else	UNSET=
+fi
+eval set x $probe_env
+while	:
+do	shift
+	case $# in
+	0)	break ;;
+	esac
+	eval x='$'$1
+	case $x in
+	'')	continue ;;
+	esac
+	case $1 in
+	*PATH)	_probe_export="$_probe_export $1='$x'" ;;
+	esac
+	case $UNSET in
+	'')	eval $1=
+		export $1
+		;;
+	*)	unset $1
+		;;
+	esac
+done
+
+if	test -f "$dir/probe.ini"
+then	. "$dir/probe.ini"
+	IFS=$ifs
+fi
+
+mkdir suffix
+cd suffix
+for src in $probe_src
+do	echo "int main(){return 0;}" > ../test.$src
+	rm -f test*
+	if	$cc -c ../test.$src
+	then	set test.*
+		if	test -f "$1"
+		then	o="$*"
+			mv $* ..
+			for i in $o
+			do	if	$cc -o test.exe ../$i
+				then	obj=`echo "$i" | sed -e 's,test.,,'`
+					$executable test.exe || executable="test -r"
+					set test*
+					rm *
+					if	$cc -o test ../$i
+					then	rm $*
+						set test.*
+						if	$executable "$1"
+						then	exe=`echo "$1" | sed -e 's,test.,,'`
+							suffix_command=.$exe
+						fi
+					fi
+					break 2
+				fi
+			done
+		fi
+	fi
+done
+cd ..
+
+case $src in
+c)	;;
+*)	echo '// (
+int
+main()
+{
+	class { public: int i; } j;
+	j.i = 0;
+	int k = j.i + 1;
+	return k;
+}' > dialect.$src
+	if	$cc -c dialect.$src && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe
+	then	mv dialect.$src dialect.c
+		rm -f dialect.$obj dialect.$exe
+		if	$cc -c dialect.c && $cc -o dialect.$exe dialect.$obj && $executable dialect.$exe
+		then	src=c
+		else	set x $cc
+			while	:
+			do	shift
+				case $# in
+				0)	break ;;
+				esac
+				case $1 in
+				*=*)	continue ;;
+				esac
+				case `echo $1 | sed -e 's,.*/,,'` in
+				*CC*|*++*|*[xX][xX]*|*[pP][lL][uU][sS]*) ;;
+				*)	src=c ;;
+				esac
+				break
+			done
+		fi
+	else	src=c
+	fi
+	;;
+esac
+
+set x x '(' 1 'int x;' 0
+while	:
+do	shift
+	shift
+	case $# in
+	[01])	break ;;
+	esac
+	rm -f test.$obj
+	echo "$1" > test.$src
+	$cc -c test.$src
+	r=$?
+	case $r in
+	0)	test -f test.$obj || r=1 ;;
+	*)	r=1 ;;
+	esac
+	case $2:$r in
+	0:0)	;;
+	0:1)	echo "$cc: not a C compiler: failed to compile \`\`$1''" >&4
+		exit 1
+		;;
+	1:0)	echo "$cc: not a C compiler: successfully compiled \`\`$1''" >&4
+		exit 1
+		;;
+	esac
+done
+
+hosttype=`package CC="$cc" || $SHELL -c "package CC='$cc'"`
+case $hosttype in
+*[Uu][Ss][Aa][Gg][Ee]:*)
+	hosttype=`PATH=$_probe_PATH; export PATH; package CC="$cc" || $SHELL -c "package CC='$cc'"`
+	;;
+esac
+
+echo '#include <stdio.h>
+int main(){printf("hello");return 0;}' > dynamic.$src
+echo 'extern int sfclose() { return 0; }' > fun.$src
+if	$cc -c dynamic.$src && $cc -c fun.$src
+then	eval set x $probe_so
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		for i in foo junk
+		do	rm -f dynamic.$exe
+			if	$cc -L. -o dynamic.$exe dynamic.$obj -l$i
+			then	: "there's really a -l$i"?
+			else	rm -f dynamic.$exe
+				cat fun.$obj > lib$i$1
+				$cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe
+				x=$?
+				rm lib$i$1
+				case $x in
+				0)	so=$1
+					rm -f dynamic.$exe > lib$i$1.1
+					$cc -L. -o dynamic.$exe dynamic.$obj -l$i && $executable dynamic.$exe
+					x=$?
+					rm lib$i$1.1
+					case $x in
+					0)	sov=1 ;;
+					esac
+					break 2
+					;;
+				*)	break
+					;;
+				esac
+			fi
+		done
+		k=
+		for i in "" .1 .2 .3 .4 .5 .6 .7 .8 .9
+		do	rm -f dynamic.$exe > libc$1$i
+			$cc -L. -o dynamic.$exe dynamic.$obj && $executable dynamic.$exe
+			x=$?
+			(cd ..; rm $tmpdir/libc$1$i)
+			case $x in
+			0)	;;
+			*)	k=X$k
+				case $k in
+				XXX)	break ;;
+				esac
+				;;
+			esac
+		done
+		case $k in
+		XXX)	so=$1
+			sov=1
+			break
+			;;
+		?*)	so=$1
+			break
+			;;
+		esac
+	done
+	rm -f dynamic.$exe
+	if	$cc -o dynamic.$exe dynamic.$obj 2>e && $executable dynamic.$exe
+	then	e=`wc -l e`
+		maybe=
+		eval set x x $probe_binding
+		while	:
+		do	shift
+			shift
+			case $# in
+			0)	break ;;
+			esac
+			rm -f dynamic.$exe
+			$cc -o dynamic.$exe $1 dynamic.$obj 2>e && $executable dynamic.$exe || continue
+			case $1 in
+			?*)	case $maybe in
+				"")	maybe=$1 ;;
+				*)	maybe=-- ;;
+				esac
+				;;
+			esac
+			case `wc -l e` in
+			$e)	;;
+			*)	continue ;;
+			esac
+			d=`ls -s dynamic.$exe`
+			rm -f dynamic.$exe
+			$cc -o dynamic.$exe $2 dynamic.$obj 2>e && $executable dynamic.$exe || continue
+			case `wc -l e` in
+			$e)	;;
+			*)	continue ;;
+			esac
+			case `ls -s dynamic.$exe` in
+			$d)	;;
+			*)	dynamic=$1
+				static=$2
+				maybe=
+				break
+				;;
+			esac
+		done
+		case $maybe in
+		""|--)	;;
+		*)	rm -f dynamic.$exe
+			if	$cc -o dynamic.$exe $maybe dynamic.$obj 2>e && $executable dynamic.$exe
+			then	e=`wc -l e`
+				if	$cc -o dynamic.$exe $maybe-bogus-bogus-bogus dynamic.$obj 2>e && $executable dynamic.$exe
+				then	case `wc -l e` in
+					$e)	;;
+					*)	dynamic=$maybe ;;
+					esac
+				else	dynamic=$maybe
+				fi
+			fi
+			;;
+		esac
+	fi
+fi
+
+eval set x $probe_version
+shift
+for o in "$@"
+do	if	$cc $o > version.out 2>&1
+	then	version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q`
+		case $version_string in
+		''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*)
+			;;
+		*)	version_flags=$o
+			version_stamp=";VERSION;$o;$version_string;PATH;$cc"
+			break
+			;;
+		esac
+	fi
+done
+case $version_stamp in
+'')	eval set x $probe_version
+	shift
+	echo 'int main() { return 0; }' > version.i
+	for o in "$@"
+	do	if	$cc -c $o version.i > version.out 2>&1
+		then	version_string=`sed -e '/ is /d' -e 's/;/ /g' version.out | sed -e 1q`
+			case $version_string in
+			''|*[Ee][Rr][Rr][Oo][Rr]*|*[Ff][Aa][Tt][Aa][Ll]*|*[Ww][Aa][Rr][Nn][Ii][Nn][Gg]*|*[Oo][Pp][Tt][Ii][Oo][Nn]*)
+				;;
+			*)	version_flags=$o
+				break
+				;;
+			esac
+		fi
+	done
+	;;
+esac
+
+echo 'int main(){return 0;}' > hosted.$src
+$cc -o hosted.$exe hosted.$src && ./hosted.$exe && hosted=1
+
+echo '#!'$sh'
+echo "" $@' > cpp
+chmod +x cpp
+case `./cpp -Dprobe` in
+*-Dprobe*)
+	;;
+*)	cp /bin/echo cpp
+	chmod u+w cpp
+	;;
+esac
+for prefix in $probe_ppprefix `echo $cc | sed -e '/cc\$/!d' -e 's,cc\$,,' -e 's,.*/,,'`
+do	cp cpp ${prefix}cpp
+done
+
+echo "" > flags.$src
+echo '#pragma pp:version' > libpp.$src
+
+if	test `realcppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppenv='realcppC=${ppcmd}'
+elif	test `cppC=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppenv='cppC=${ppcmd}'
+elif	test `_CPPNAME=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppenv='_CPPNAME=${ppcmd}'
+elif	test `_CPP=./cpp $cc -Dprobe -E flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppenv='_CPP=${ppcmd}'
+elif	test `$cc -Dprobe -E -%p+. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 && test `$cc -Dprobe -E -%p+. flags.$src | wc -l` -eq 1
+then	ppopt='-%p+${ppdir}'
+elif	test `$cc -Dprobe -E -Yp,. flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppopt='-Yp,${ppdir}'
+elif	test `$cc -Dprobe -E -Qpath $tmpdir flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppopt='-Qpath ${ppdir}'
+elif	test `$cc -Dprobe -E -tp -B./ flags.$src 2>err.out | tee cpp.out | grep -c '[-]Dprobe'` -eq 1 -a ! -s err.out
+then	ppopt='-tp -B${ppdir}/'
+elif	test `$cc -Dprobe -E -B./ flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppopt='-B${ppdir}/'
+elif	test `$cc -Dprobe -E -tp -h./ -B flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppopt='-tp -h${ppdir}/ -B'
+elif	test `$cc -Dprobe -E -t p,./cpp flags.$src | tee cpp.out | grep -c '[-]Dprobe'` -eq 1
+then	ppopt='-t p,${ppcmd}'
+else	{
+		eval set x $probe_verbose
+		shift
+		for o in "$@"
+		do	$cc -E $o flags.$src
+		done
+	} 2>&1 | sed -e "s/['\"]//g" > cpp.out
+fi
+
+set x `sed -e 's,[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:\\\\,/,g' -e 's,\\\\,/,g' cpp.out`
+def=
+definclude="-I+C -I-H"
+stdinclude=$definclude
+case $hosted in
+"")	usrinclude= ;;
+esac
+cmdinclude=
+while	:
+do	case $# in
+	0|1)	break ;;
+	esac
+	shift
+	case $1 in
+	-A)	case $2 in
+		*\(*\))	shift
+			prepred="$prepred `echo $1 | sed 's/\(.*\)(\(.*\))/\1 \2/'`"
+			;;
+		esac
+		;;
+	-A\(*\))
+		prepred="$prepred `echo $1 | sed 's/-A\(.*\)(\(.*\))/\1 \2/'`"
+		;;
+	-[DI][-+][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
+		stdpp=1
+		case $1 in
+		-I?[CH])	case $def in
+				?*)	definclude="$definclude $1" ;;
+				*)	stdinclude="$stdinclude $1" ;;
+				esac
+				;;
+		-I-S*|-YI,*)	usrinclude="`echo $1 | sed 's/....//'`" ;;
+		-Y?,*)		;;
+		-Y*)		usrinclude="`echo $1 | sed 's/..//'`" ;;
+		esac
+		;;
+	-D)	shift
+		case $1 in
+		[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*)
+			predef="$predef
+`echo $1 | sed -e 's/=.*//'`"
+			;;
+		[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*)
+			predef="$predef
+$1"
+			;;
+		esac
+		;;
+	-Dprobe);;
+	-D*)	case $1 in
+		-D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*=*)
+			predef="$predef
+`echo $1 | sed -e 's/^-D//' -e 's/=.*//'`"
+			;;
+		-D[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz_]*)
+			predef="$predef
+`echo $1 | sed -e 's/^-D//'`"
+			;;
+		esac
+		;;
+	-I)	shift
+		case $1 in
+		/*)	case $def in
+			?*)	definclude="$definclude $1" ;;
+			*)	stdinclude="$stdinclude $1" ;;
+			esac
+			cmdinclude="$cmdinclude $1"
+			;;
+		esac
+		;;
+	-I/*)	f=`echo X$1 | sed 's/X-I//'`
+		case $def in
+		?*)	definclude="$definclude $f" ;;
+		*)	stdinclude="$stdinclude $f" ;;
+		esac
+		cmdinclude="$cmdinclude $f"
+		;;
+	-U)	shift
+		undef="$undef $1"
+		;;
+	-U*)	undef="$undef `echo $1 | sed 's/^-U//'`"
+		;;
+	flags.$src)def=
+		;;
+	esac
+done
+stdinclude="$stdinclude $definclude"
+case " $stdinclude " in
+*\ $usrinclude\ *)
+	case $usrinclude in
+	/usr/include)
+		usrinclude=
+		;;
+	*)	case " $stdinclude " in
+		*\ /usr/include\ *)
+			usrinclude=
+			;;
+		*)	usrinclude=/usr/include
+			;;
+		esac
+		;;
+	esac
+	;;
+esac
+
+tstinclude=`$cc -v -E flags.$src 2>&1 | sed -e '1,/[iI][nN][cC][lL][uU][dD][eE][ 	]*<[.][.][.]>/d' -e '/^[eE][nN][dD] [oO][fF] [sS][eE][aA][rR][cC][hH]/,\$d'`
+j=$tstinclude
+case $j in
+*/*)	;;
+*)	j=$cmdinclude ;;
+esac
+tstinclude=
+good=
+nogood=
+c_hdr="stdio.h ctype.h"
+C_hdr="libc.h"
+for i in $j
+do	if	test -d "$i"
+	then	tstinclude="$tstinclude $i"
+		h=
+		for f in $c_hdr
+		do	if	test -f "$i/$f"
+			then	case $i in
+				*/CC)	nogood=1 ;;
+				*)	good=1 ;;
+				esac
+			else	h="$h $f"
+			fi
+		done
+		c_hdr=$h
+		h=
+		for f in $C_hdr
+		do	if	test -f "$i/$f"
+			then	case $i in
+				*/CC)	nogood=1 ;;
+				*)	good=1 ;;
+				esac
+			else	h="$h $f"
+			fi
+		done
+		C_hdr=$h
+	fi
+done
+case $nogood in
+1)	good=0 ;;
+esac
+case $good in
+1)	case $c_hdr in
+	?*)	bad=1
+		usrinclude=/usr/include
+		set '' $tstinclude /usr/include
+		;;
+	*)	set '' $tstinclude
+		;;
+	esac
+	shift
+	stdinclude=$*
+	echo "#include <sys/types.h>" > include.$src
+	$cc -E include.$src | sed -e '/# 1 "[\\/]/!d' -e 's,[^"]*",,' -e 's,[\\/][^\\/]*".*,,' -e 's,[\\/]sys,,' > include.out
+	for f in `cat include.out`
+	do	if	test -d "$f"
+		then	g=`echo $f | sed -e 's,[\\/][\\/]*[^\\/]*$,,'`
+			case " $stdinclude " in
+			*\ $f\ *|*\ $g\ *)
+				;;
+			*)	stdinclude="$stdinclude $f"
+				case $f in
+				/usr/include)	usrinclude=$f ;;
+				esac
+				bad=1
+				;;
+			esac
+		fi
+	done
+	;;
+*)	case $ppopt$ppenv in
+	?*)	echo '#!'$sh'
+		echo $VIRTUAL_ROOT | sed "s/:.*//"' > cpp
+		chmod +x cpp
+		ppcmd=cpp
+		ppdir=.
+		eval x='`'$ppenv '$'cc -E $ppopt flags.$src'`'
+		case $x in
+		?*)	tstinclude=$x/usr/include
+			;;
+		esac
+		cp /bin/echo cpp
+		chmod u+w cpp
+		;;
+	esac
+
+	eval set x $probe_include
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		echo "#include <$1>" > include.$src
+		$cc -E include.$src
+	done > include.out
+
+	ccinclude=
+	x=$stdinclude
+	stdinclude=
+	subinclude=
+	for f in $x $tstinclude `sed -e 's,\\\\,/,g' -e 's,///*,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line 	]*[0123456789][0123456789]*[ 	][ 	]*"[\\/]/!d' -e 's/^#[line 	]*[0123456789][0123456789]*[ 	][ 	]*"\(.*\)[\\/].*".*/\1/' include.out | sort -u`
+	do	case $f in
+		-*)	;;
+		*/)	f=`echo $f | sed -e 's,//*\$,,'` ;;
+		*/.)	f=`echo $f | sed -e 's,//*.\$,,'` ;;
+		esac
+		case $f in
+		-I*)	;;
+		*/cc)	ccinclude=1
+			;;
+		*/sys)	continue
+			;;
+		*/include/*/*)
+			;;
+		*/include/*)
+			subinclude="$subinclude $f"
+			continue
+			;;
+		esac
+		if	test -d "$f"
+		then	case " $stdinclude " in
+			*\ $f\ *)	;;
+			*)	stdinclude="$stdinclude $f" ;;
+			esac
+		fi
+	done
+	rm include.out
+	case $ccinclude in
+	?*)	eval set x $probe_include
+		while	:
+		do	shift
+			case $# in
+			0)	break ;;
+			esac
+			echo "#include <cc/$1>" > include.$src
+			if	$cc -E include.$src > /dev/null
+			then	break
+			fi
+		done
+		case $# in
+		0)	;;
+		*)	x=$stdinclude
+			stdinclude=
+			for f in $x
+			do	case $f in
+				*/cc)	;;
+				*)	stdinclude="$stdinclude $f" ;;
+				esac
+			done
+			;;
+		esac
+		;;
+	esac
+	case $subinclude in
+	?*)	for i in $subinclude
+		do	for j in $stdinclude
+			do	case $i in
+				$j/*/*)	;;
+				$j/*)	both=
+					eval set x $probe_include
+					while	:
+					do	shift
+						case $# in
+						0)	for k in $both
+							do	echo "#include <$k>" > include.$src
+								$cc -E include.$src > include.out
+								I=`grep -c $i/$k < include.out`
+								J=`grep -c $j/$k < include.out`
+								case $I:$J in
+								0:*)	;;
+								*:0)	stdinclude="$i $stdinclude"
+									break
+									;;
+								esac
+							done
+							continue 3
+							;;
+						esac
+						if	test -f $i/$1
+						then	if	test ! -f $j/$1
+							then	break 2
+							fi
+							both="$both $1"
+						fi
+					done
+					;;
+				$j)	continue 2
+				;;
+				esac
+			done
+			stdinclude="$i $stdinclude"
+		done
+		;;
+	esac
+
+	{
+
+	for i in $stdinclude
+	do
+		case $i in
+		$usrinclude)	;;
+		*)		echo $i $i ;;
+		esac
+	done
+
+	eval set x $probe_include
+	while	:
+	do	shift
+		case $# in
+		0)	break ;;
+		esac
+		echo "#include <$1>" > t.c
+		p=
+		for j in `$cc -E t.c | grep "$1" | sed -e 's,\\\\,/,g' -e 's,"[ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]:/,"/,g' -e '/^#[line 	]*1[ 	][ 	]*"[\\/]/!d' -e 's/^#[line 	]*1[ 	][ 	]*"\(.*\)[\\/].*".*/\1/'`
+		do	j=`echo $j | sed -e 's,///*,/,g' -e 's,/$,,'`
+			case $p in
+			?*)	echo $p $j ;;
+			esac
+			p=$j
+		done
+	done
+
+	case $usrinclude in
+	?*)	echo $usrinclude $usrinclude ;;
+	esac
+
+	} | tsort > tmp.tmp
+	tstinclude=`cat tmp.tmp`
+	bad=
+	for i in $stdinclude
+	do	case "
+$tstinclude
+" in
+		*"
+$i
+"*)			;;
+		*)	bad=1
+			break
+			;;
+		esac
+	done
+	;;
+esac
+
+case $bad in
+"")	x=$stdinclude
+	stdinclude=
+	z=
+	for i in $tstinclude
+	do	case " $x " in
+		*" $i "*)
+			stdinclude="$stdinclude $i"
+			z=$i
+			;;
+		esac
+	done
+	case $usrinclude in
+	'')	usrinclude=$z ;;
+	esac
+	;;
+esac
+case $hosted in
+"")	case $usrinclude in
+	/usr/include)	usrinclude= ;;
+	esac
+	;;
+esac
+
+case $usrinclude in
+?*)	case " $stdinclude " in
+	*\ $usrinclude\ *)
+		x=$stdinclude
+		stdinclude=
+		for f in $x
+		do	case $f in
+			$usrinclude)	;;
+			*)		stdinclude="$stdinclude $f" ;;
+			esac
+		done
+		;;
+	esac
+	;;
+esac
+
+# drop dups -- they creep in somehow
+
+x=$stdinclude
+stdinclude=
+for f in $x
+do	case " $stdinclude $usrinclude " in
+	*" $f "*)	;;
+	*)		stdinclude="$stdinclude $f" ;;
+	esac
+done

+ 260 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/CONVERT.mk

@@ -0,0 +1,260 @@
+/*
+ * {automake|configure} => {nmake|iffe} conversion support
+ *
+ * The first command line target overrides the default original source
+ * directory name $(MAKEFILE:D). The hard work is in the makefile using
+ * these assertions, since it must (manually) provide the nmake makefiles
+ * and config equivalent iffe scripts. The conversion makefile is typically
+ * named lib/package/PACKAGE.cvt in an ast package $PACKAGEROOT directory,
+ * and the conversion is run from the $PACKAGEROOT directory, e.g.:
+ *
+ *	nmake -I lib/package -f PACKAGE-VERSION/PACKAGE.cvt
+ *
+ * The conversion requires the ast nmake, pax and tw commands.
+ *
+ * After the conversion you will be liberated from ./configure, *.in,
+ * *.am, automake, autom4te, libtool, make depend, and makefile
+ * recursion ordering. You can build from $PACKAGEROOT using the ast
+ * package(1) (which sets up the { HOSTTYPE PATH VPATH } environment):
+ *
+ *	package make
+ *
+ * or cd into any arch/$HOSTTYPE/src subdirectory and rebuild that portion
+ * of the hierarchy with the ast nmake(1) (after setting PATH and VPATH):
+ *
+ *	nmake
+ *
+ * The conversion assertions are:
+ *
+ *	package :CONVERT: file ...
+ *
+ *	    files in the original source directory are copied
+ *	    and converted into the ./src and ./lib subdirectories 
+ *	    the default original source directory is ./original
+ *
+ *		package	package name
+ *		file	original source file that must exist
+ *
+ *	:OMIT: pattern
+ *
+ *	    files matching pattern are not copied into the converted
+ *	    directory
+ *
+ *		pattern	ksh pattern of files to omit
+ *
+ *	:COPY: from to [ file ... ]
+ *
+ *	    files in the from directory are copied to the to directory
+ *	    the action may contain :MOVE: exceptions to the copy
+ *
+ *		from	original directory subdirectory
+ *			  . names the original directory
+ *			 .. names the 
+ *		to	converted subdirectory
+ *			  libNAME => src/lib/libNAME
+ *			     NAME => src/cmd/NAME
+ *		file	files or files in subdirectories to be copied;
+ *			explicit files are copied to the to directory;
+ *			if no files are specified then the from hierarchy
+ *			is recursively copied to the converted directory
+ *
+ *	:MOVE: to file ...
+ *
+ *	    :COPY: assertion exceptions placed in the assertion's action
+ *
+ *		to	files or subdirectory files are copied to this directory
+ *		file	file or files in subdirectories to be copied
+ *
+ *	:FILE: to file <<!
+ *	contents
+ *	!
+ *
+ *	    the :FILE: action is copied to the named file in the to directory
+ *	    the :FILE: action is usually specified using the here syntax to
+ *	    avoid make comment, quote and variable expansion
+ *
+ *	:EDIT: to file ... | - pattern <<!
+ *	edit script
+ *	!
+ *
+ *	    the :EDIT: action is an ed(1) script applied to each file in the
+ *	    to directory after it has been copied from the original source
+ *	    directory; if to is - then the :EDIT: action is a sed(1) script
+ *	    that is applied to all files matching the file pattern during the
+ *	    copy from the original source directory; a file may be subject to
+ *	    both a sed(1) and ed(1) :EDIT:; the :EDIT: action is usually
+ *	    specified using the here syntax to avoid make comment, quote and
+ *	    variable expansion
+ */
+
+.CONVERT.ID. = "@(#)$Id: CONVERT (AT&T Research) 2004-03-19 $"
+
+set nojobs noscan nowriteobject writestate=$$(MAKEFILE).ms
+
+package = $(PWD:B)
+here = !-=-=-=-=-!
+hierarchy = src src/cmd src/lib
+omit = .*|*.?(l)[ao]
+original = $(MAKEFILE:D)
+showedit = $(-debug:?p??)
+
+CPFLAGS = -u
+PAXFLAGS = -u -v
+STDEDFLAGS = -
+TW = tw
+TWFLAGS = -CP
+
+all  : .VIRTUAL file
+file : .VIRTUAL edit
+edit : .VIRTUAL copy
+copy : .VIRTUAL init
+init : .VIRTUAL
+
+.MAKEINIT : .cvt.init
+
+.cvt.init : .MAKE .VIRTUAL .FORCE
+	local D
+	if D = "$(~.ARGS:O=1)"
+		if "$(D:T>FD)"
+			original := $(D)
+			.ARGS : .CLEAR $(~.ARGS:O>1)
+		end
+	end
+
+.cvt.filter =
+.cvt.package =
+
+.cvt.atom : .FUNCTION
+	local N V
+	V := $(%:O=1)
+	let .cvt.$(V) = .cvt.$(V) + 1
+	return .cvt.$(V).$(.cvt.$(V))
+
+.cvt.omit : .FUNCTION
+	return -s',^\(\(?K)?(*/)($(omit))?(/*))$,,$(showedit)'
+
+.cvt.to : .FUNCTION
+	if "$(%)" == "."
+		return src
+	end
+	if "$(%)" == "*/*"
+		return src/$(%)
+	end
+	if "$(%)" == "lib*"
+		return src/lib/$(%)
+	end
+	return src/cmd/$(%)
+
+":CONVERT:" : .MAKE .OPERATOR
+	local I
+	package := $(<)
+	I := $(hierarchy:C,$,/Makefile)
+	init : .cvt.verify $(I)
+	$(I) : .ACCEPT
+		test -d $(<:D) || $(MKDIR) -p $(<:D)
+		echo :MAKE: > $(<)
+	.cvt.verify : .MAKE .FORCE .REPEAT
+		local I
+		if I = "$(.cvt.package:T!=F)"
+			error 3 $(original): not a $(package) source directory: missing $(I)
+		end
+	.cvt.package := $(>:C,^,$$(original)/,)
+
+":COPY:" : .MAKE .OPERATOR
+	local F T I A
+	F := $(>:O=1)
+	T := $(.cvt.to $(>:O=2))
+	A := $(.cvt.atom copy)
+	copy : $(A)
+	$(A) : .VIRTUAL
+	if F == "."
+		$(A) : $(T)
+		$(T) :
+			test -d $(<) || $(MKDIR) -p $(<)
+		for I $(>:O>2)
+			eval
+			$$(A) : $(I:D=$(T):B:S)
+			$(I:D=$(T):B:S) : $$(original)/$(I)
+				$$(CP) $$(CPFLAGS) $$(*) $$(<)
+			end
+		end
+	elif "$(F:T=FF)" || "$(F:N=*.(pax|t[bg]z))"
+		eval
+		$$(A) : $$(F)
+			test -d $(T) || $$(MKDIR) -p $(T)
+			cd $(T)
+			$$(PAX) $$(PAXFLAGS) -rf $$(*:P=A) -s ',^$(>:O=2)/*,,' $(.cvt.omit) $(.cvt.filter)
+		end
+	else
+		F := $$(original)/$(F)
+		if ! "$(@:V)"
+			eval
+			$$(A) : .FORCE
+				test -d $(T) || $$(MKDIR) -p $(T)
+				cd $(F:V)
+				$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.filter) $(T:P=A)
+			end
+		else
+			.cvt.move =
+			: $(@:V:@R)
+			eval
+			$$(A) : .FORCE
+				test -d $(T) || $$(MKDIR) -p $(T)
+				cd $(F:V)
+				$$(TW) $$(TWFLAGS) | $$(PAX) $$(PAXFLAGS) -rw $(.cvt.omit) $(.cvt.move) $(.cvt.filter) $(T:P=A)
+			end
+		end
+	end
+
+":EDIT:" : .MAKE .OPERATOR
+	local A D F
+	D := $(>:O=1)
+	if D == "-"
+		A := ^$(>:O=2)^$$(SED) -e $(@:Q:/'\n'/ -e /G)
+		.cvt.filter += --action=$(A:@Q)
+	else
+		D := $(.cvt.to $(D))
+		F := $(>:O>1:C,^,$(D)/,)
+		edit : $(F)
+		eval
+		$$(F) :
+			$$(STDED) $$(STDEDFLAGS) $$(<) <<'$(here)'
+			$(@:V)
+			w
+			q
+			$(here)
+		end
+	end
+
+":FILE:" : .MAKE .OPERATOR
+	local ( D F ) $(>)
+	local A
+	A := $(.cvt.atom file)
+	$(A) := $(@:V)
+	D := $(.cvt.to $(D))
+	file : $(D)/$(F)
+	eval
+	$$(D)/$$(F) :
+		test -d $$(<:D) || $$(MKDIR) -p $$(<:D)
+		cat > $$(<) <<'$(here)'
+		$$($(A):V)
+		$(here)
+	end
+
+":MOVE:" : .MAKE .OPERATOR
+	local T I
+	T := ../../../$(.cvt.to $(>:O=1))
+	for I $(>:O>1)
+		if I == "*/"
+			.cvt.move += -s',^\(\(?K)$(I)),$(T)/,$(showedit)'
+			.cvt.move += -s',^\(\(?K)$(I:C%/$%%))$,,$(showedit)'
+		else
+			.cvt.move += -s',^\(\(?K)$(I))$,$(T)/$(I:B:S),$(showedit)'
+		end
+	end
+
+":OMIT:" : .MAKE .OPERATOR
+	local P
+	for P $(>)
+		omit := $(omit)|$(P)
+	end

+ 45 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/MAPLIB.mk

@@ -0,0 +1,45 @@
+/*
+ * normalize local -l* library conventions
+ *
+ * L [ [ G11 ... G1n ] ... [ Gg1 ... Ggn ] ] :MAPLIB: T1.c ... Tn.c
+ *
+ * if Giji not specified then G11 == L
+ * the first Ti.c that compiles/links with group -lGi1 ... -lGin
+ * but does not compile/link with no libraries maps
+ * -lL to require -lGi1 ... -lGin
+ * otherwise -lL is not required and maps to "no library required"
+ */
+
+":MAPLIB:" : .MAKE .OPERATOR
+	local L P
+	L := $(<:B:O=1)
+	if ! ( P = "$(<:B:O>1)" )
+		P := $(L)
+	end
+	$(LIBDIR)/lib/$(L) :INSTALL: $(L).req
+	eval
+	$(L).req : (CC) $$(>)
+		set -
+		r='-'
+		for i in $$(*)
+		do	if	$$(CC) -c $i > /dev/null
+			then	g=
+				for p in $(P) -
+				do	case $p in
+					-)	if	$$(CC) -o $$(<:B:S=.exe) $i $g > /dev/null 2>&1
+						then	$$(CC) -o $$(<:B:S=.exe) $i > /dev/null 2>&1 || {
+								r="$g"
+								break 2
+							}
+						fi
+						g=
+						;;
+					*)	g="$g -l$p"
+						;;
+					esac
+				done
+			fi
+		done 2>/dev/null
+		echo " $r" > $$(<)
+		rm -f $$(<:B:S=.exe) $$(*:B:S=$$(CC.SUFFIX.OBJECT))
+	end

+ 2 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/MSGFUN.mk

@@ -0,0 +1,2 @@
+/* stub for pre-2000-05-01 nmake */
+":MSGFUN:" : .MAKE .OPERATOR

+ 2 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/MSGKEY.mk

@@ -0,0 +1,2 @@
+/* stub for pre-2000-05-01 nmake */
+":MSGKEY:" : .MAKE .OPERATOR

+ 1393 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/Mamfile

@@ -0,0 +1,1393 @@
+info mam static 00000 1994-07-17 make (AT&T Research) 5.7 2012-06-20
+note *
+note * This build file is in the Make Abstract Machine (MAM) language. It was
+note * first generated by nmake, but in the ksh 93u+m distribution we maintain
+note * it manually because nmake had too many problems to keep using. The
+note * Mamfiles are processed by mamake (src/cmd/INIT/mamake.c); we added
+note * support for indentation to improve readability. The language is
+note * documented in Glenn Fowler's paper "A Make Abstract Machine":
+note * http://web.archive.org/web/20041227143022/http://www2.research.att.com/~gsf/mam/mam.html
+note *
+setv INSTALLROOT ../../..
+setv PACKAGEROOT ../../../../..
+setv AR ${mam_cc_AR} ${mam_cc_AR_ARFLAGS}
+setv ARFLAGS rc
+setv AS as
+setv ASFLAGS
+setv CC cc
+setv mam_cc_FLAGS
+setv KSH_RELFLAGS
+setv CCFLAGS ${-debug-symbols?1?${mam_cc_DEBUG} -D_BLD_DEBUG?${mam_cc_OPTIMIZE}?}
+setv CCLDFLAGS ${-strip-symbols?1?${mam_cc_LD_STRIP}??}
+setv COTEMP $$
+setv CPIO cpio
+setv CPIOFLAGS
+setv CPP "${CC} -E"
+setv F77 f77
+setv HOSTCC ${CC}
+setv IGNORE
+setv LD ld
+setv LDFLAGS
+setv LEX lex
+setv LEXFLAGS
+setv LPR lpr
+setv LPRFLAGS
+setv M4FLAGS
+setv NMAKE nmake
+setv NMAKEFLAGS
+setv PR pr
+setv PRFLAGS
+setv SHELL /bin/sh
+setv SILENT
+setv TAR tar
+setv YACC yacc
+setv YACCFLAGS -d
+make ${PACKAGEROOT}/lib/package/ast.lic
+done ${PACKAGEROOT}/lib/package/ast.lic
+make install
+	make hurl
+		make hurl.sh
+		done hurl.sh
+		meta hurl %.sh>% hurl.sh hurl
+		prev hurl.sh
+		setv LICENSE -DLICENSE="since=2003,author=gsf"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : hurl contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n hurl.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp hurl.sh hurl
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < hurl.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - hurl.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2003-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > hurl
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - hurl.sh > hurl <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2003-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w hurl -a -x hurl || chmod u+w,+x hurl
+	done hurl generated
+	make iffe
+		make iffe.sh
+		done iffe.sh
+		meta iffe %.sh>% iffe.sh iffe
+		prev iffe.sh
+		setv LICENSE -DLICENSE="since=1994,author=gsf+kpv"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : iffe contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n iffe.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 225 in
+		exec - 0) cp iffe.sh iffe
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < iffe.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - iffe.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Phong Vo <kpv@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > iffe
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - iffe.sh > iffe <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Phong Vo <kpv@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w iffe -a -x iffe || chmod u+w,+x iffe
+	done iffe generated
+	make mktest
+		make mktest.sh
+		done mktest.sh
+		meta mktest %.sh>% mktest.sh mktest
+		prev mktest.sh
+		setv LICENSE -DLICENSE="since=2005,author=gsf"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : mktest contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n mktest.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp mktest.sh mktest
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < mktest.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - mktest.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > mktest
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - mktest.sh > mktest <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w mktest -a -x mktest || chmod u+w,+x mktest
+	done mktest generated
+	make package
+		make package.sh
+		done package.sh
+		meta package %.sh>% package.sh package
+		prev package.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : package contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n package.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp package.sh package
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < package.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - package.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > package
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - package.sh > package <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w package -a -x package || chmod u+w,+x package
+	done package generated
+	make regress
+		make regress.sh
+		done regress.sh
+		meta regress %.sh>% regress.sh regress
+		prev regress.sh
+		setv LICENSE -DLICENSE="since=1995,author=gsf"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : regress contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n regress.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp regress.sh regress
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < regress.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - regress.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > regress
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - regress.sh > regress <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1995-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w regress -a -x regress || chmod u+w,+x regress
+	done regress generated
+	make rt
+		make rt.sh
+		done rt.sh
+		meta rt %.sh>% rt.sh rt
+		prev rt.sh
+		setv LICENSE -DLICENSE="since=2005,author=gsf"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : rt contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n rt.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp rt.sh rt
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < rt.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - rt.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > rt
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - rt.sh > rt <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2005-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w rt -a -x rt || chmod u+w,+x rt
+	done rt generated
+	make crossexec
+		make crossexec.sh
+		done crossexec.sh
+		meta crossexec %.sh>% crossexec.sh crossexec
+		prev crossexec.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : crossexec contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n crossexec.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp crossexec.sh crossexec
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < crossexec.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - crossexec.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > crossexec
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - crossexec.sh > crossexec <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w crossexec -a -x crossexec || chmod u+w,+x crossexec
+	done crossexec generated
+	make ditto
+		make ditto.sh
+		done ditto.sh
+		meta ditto %.sh>% ditto.sh ditto
+		prev ditto.sh
+		setv LICENSE -DLICENSE="since=2001,author=gsf+ek"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : ditto contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n ditto.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 232 in
+		exec - 0) cp ditto.sh ditto
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < ditto.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - ditto.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Lefty Koutsofios <ek@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > ditto
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - ditto.sh > ditto <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-author?Lefty Koutsofios <ek@research.att.com>][-copyright?Copyright (c) 2001-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w ditto -a -x ditto || chmod u+w,+x ditto
+	done ditto generated
+	make execrate
+		make execrate.sh
+		done execrate.sh
+		meta execrate %.sh>% execrate.sh execrate
+		prev execrate.sh
+		setv LICENSE -DLICENSE="since=2002,author=gsf"
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : execrate contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n execrate.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp execrate.sh execrate
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < execrate.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - execrate.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > execrate
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - execrate.sh > execrate <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 2002-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w execrate -a -x execrate || chmod u+w,+x execrate
+	done execrate generated
+	make filter
+		make filter.sh
+		done filter.sh
+		meta filter %.sh>% filter.sh filter
+		prev filter.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : filter contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n filter.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 184 in
+		exec - 0) cp filter.sh filter
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < filter.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - filter.sh <<'!'
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - } > filter
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - filter.sh > filter <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec - USAGE_LICENSE="[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w filter -a -x filter || chmod u+w,+x filter
+	done filter generated
+	make ignore
+		make ignore.sh
+		done ignore.sh
+		meta ignore %.sh>% ignore.sh ignore
+		prev ignore.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : ignore contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n ignore.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 0 in
+		exec - 0) cp ignore.sh ignore
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < ignore.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - ignore.sh <<'!'
+		exec -
+		exec - !
+		exec - } > ignore
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - ignore.sh > ignore <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec -
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w ignore -a -x ignore || chmod u+w,+x ignore
+	done ignore generated
+	make silent
+		make silent.sh
+		done silent.sh
+		meta silent %.sh>% silent.sh silent
+		prev silent.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : silent contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n silent.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 0 in
+		exec - 0) cp silent.sh silent
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < silent.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - silent.sh <<'!'
+		exec -
+		exec - !
+		exec - } > silent
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - silent.sh > silent <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec -
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w silent -a -x silent || chmod u+w,+x silent
+	done silent generated
+	make mamake
+		make mamake.o
+			make mamake.c
+				make shlib-compat.h implicit
+				done shlib-compat.h dontcare virtual
+				make ast.h implicit
+				done ast.h dontcare virtual
+			done mamake.c
+			meta mamake.o %.c>%.o mamake.c mamake
+			prev mamake.c
+			exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"\" -c mamake.c
+		done mamake.o generated
+		exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o mamake mamake.o
+	done mamake generated
+	make proto
+		make proto.o
+			make proto.c
+			done proto.c
+			meta proto.o %.c>%.o proto.c proto
+			prev proto.c
+			exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c proto.c
+		done proto.o generated
+		exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o proto proto.o
+	done proto generated
+	make ratz
+		make ratz.o
+			make ratz.c
+				make unix.h implicit
+				done unix.h dontcare virtual
+				make alloc.h implicit
+				done alloc.h dontcare virtual
+				make unixio.h implicit
+				done unixio.h dontcare virtual
+				make ast_std.h implicit
+				done ast_std.h dontcare virtual
+				make windows.h implicit
+				done windows.h dontcare virtual
+				make io.h implicit
+				done io.h dontcare virtual
+				make direct.h implicit
+				done direct.h dontcare virtual
+				prev ast.h implicit
+			done ratz.c
+			meta ratz.o %.c>%.o ratz.c ratz
+			prev ratz.c
+			exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -c ratz.c
+		done ratz.o generated
+		exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o ratz ratz.o
+	done ratz generated
+	make release
+		make release.o
+			make release.c
+				prev ast.h implicit
+			done release.c
+			meta release.o %.c>%.o release.c release
+			prev release.c
+			exec - ${CC} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} -DUSAGE_LICENSE=\""[-author?Glenn Fowler <gsf@research.att.com>][-copyright?Copyright (c) 1994-2012 AT&T Intellectual Property][-license?http://www.eclipse.org/org/documents/epl-v10.html]"\" -c release.c
+		done release.o generated
+		exec - ${CC} ${CCLDFLAGS} ${mam_cc_FLAGS} ${KSH_RELFLAGS} ${CCFLAGS} ${LDFLAGS} -o release release.o
+	done release generated
+	make mprobe
+		make mprobe.sh
+		done mprobe.sh
+		meta mprobe %.sh>% mprobe.sh mprobe
+		prev mprobe.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : mprobe contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n mprobe.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 0 in
+		exec - 0) cp mprobe.sh mprobe
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < mprobe.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - mprobe.sh <<'!'
+		exec -
+		exec - !
+		exec - } > mprobe
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - mprobe.sh > mprobe <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec -
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w mprobe -a -x mprobe || chmod u+w,+x mprobe
+	done mprobe generated
+	make probe
+		make probe.sh
+			make C+probe
+			done C+probe
+			make make.probe
+			done make.probe
+			exec - cat C+probe make.probe > probe.sh
+		done probe.sh generated
+		meta probe %.sh>% probe.sh probe
+		prev probe.sh
+		exec - case static,port:$OPTIND:$RANDOM in
+		exec - ?*:*:*|*::*|*:*:$RANDOM)
+		exec - ;;
+		exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+		exec - then if grep '### .*archaic.* ###' >/dev/null
+		exec - then : probe contains archaic constructs :
+		exec - else ENV= LC_ALL=C $SHELL -n probe.sh
+		exec - fi
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case '${mam_cc_SHELLMAGIC}' in
+		exec - "") case 0 in
+		exec - 0) cp probe.sh probe
+		exec - ;;
+		exec - *) {
+		exec - i=`(read x; echo $x) < probe.sh`
+		exec - case $i in
+		exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+		exec - esac
+		exec - cat - probe.sh <<'!'
+		exec -
+		exec - !
+		exec - } > probe
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - *) cat - probe.sh > probe <<'!'
+		exec - ${mam_cc_SHELLMAGIC}
+		exec -
+		exec - !
+		exec - ;;
+		exec - esac
+		exec - test -w probe -a -x probe || chmod u+w,+x probe
+	done probe generated
+	make ${INSTALLROOT}/bin
+		exec - if test ! -d ${INSTALLROOT}/bin
+		exec - then mkdir -p ${INSTALLROOT}/bin
+		exec - fi
+	done ${INSTALLROOT}/bin generated
+	make ${INSTALLROOT}/bin/hurl
+		prev ${INSTALLROOT}/bin
+		prev hurl
+		exec - test '' = 'hurl' || ${STDCMP} 2>/dev/null -s hurl ${INSTALLROOT}/bin/hurl || { ${STDMV} ${INSTALLROOT}/bin/hurl ${INSTALLROOT}/bin/hurl.old 2>/dev/null || true; ${STDCP} hurl ${INSTALLROOT}/bin/hurl ;}
+	done ${INSTALLROOT}/bin/hurl generated
+	make ${INSTALLROOT}/bin/iffe
+		prev iffe
+		exec - test '' = 'iffe' || ${STDCMP} 2>/dev/null -s iffe ${INSTALLROOT}/bin/iffe || { ${STDMV} ${INSTALLROOT}/bin/iffe ${INSTALLROOT}/bin/iffe.old 2>/dev/null || true; ${STDCP} iffe ${INSTALLROOT}/bin/iffe ;}
+	done ${INSTALLROOT}/bin/iffe generated
+	make ${INSTALLROOT}/bin/mktest
+		prev mktest
+		exec - test '' = 'mktest' || ${STDCMP} 2>/dev/null -s mktest ${INSTALLROOT}/bin/mktest || { ${STDMV} ${INSTALLROOT}/bin/mktest ${INSTALLROOT}/bin/mktest.old 2>/dev/null || true; ${STDCP} mktest ${INSTALLROOT}/bin/mktest ;}
+	done ${INSTALLROOT}/bin/mktest generated
+	make ${INSTALLROOT}/bin/package
+		prev package
+		exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${INSTALLROOT}/bin/package || { ${STDMV} ${INSTALLROOT}/bin/package ${INSTALLROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${INSTALLROOT}/bin/package ;}
+	done ${INSTALLROOT}/bin/package generated
+	make ${INSTALLROOT}/bin/regress
+		prev regress
+		exec - test '' = 'regress' || ${STDCMP} 2>/dev/null -s regress ${INSTALLROOT}/bin/regress || { ${STDMV} ${INSTALLROOT}/bin/regress ${INSTALLROOT}/bin/regress.old 2>/dev/null || true; ${STDCP} regress ${INSTALLROOT}/bin/regress ;}
+	done ${INSTALLROOT}/bin/regress generated
+	make ${INSTALLROOT}/bin/rt
+		prev rt
+		exec - test '' = 'rt' || ${STDCMP} 2>/dev/null -s rt ${INSTALLROOT}/bin/rt || { ${STDMV} ${INSTALLROOT}/bin/rt ${INSTALLROOT}/bin/rt.old 2>/dev/null || true; ${STDCP} rt ${INSTALLROOT}/bin/rt ;}
+	done ${INSTALLROOT}/bin/rt generated
+	make ${PACKAGEROOT}/bin
+		exec - if test ! -d ${PACKAGEROOT}/bin
+		exec - then mkdir -p ${PACKAGEROOT}/bin
+		exec - fi
+	done ${PACKAGEROOT}/bin generated
+	make ${PACKAGEROOT}/bin/execrate
+		prev ${PACKAGEROOT}/bin
+		prev execrate
+		exec - test '' = 'execrate' || ${STDCMP} 2>/dev/null -s execrate ${PACKAGEROOT}/bin/execrate || { ${STDMV} ${PACKAGEROOT}/bin/execrate ${PACKAGEROOT}/bin/execrate.old 2>/dev/null || true; ${STDCP} execrate ${PACKAGEROOT}/bin/execrate ;}
+	done ${PACKAGEROOT}/bin/execrate generated
+	make ${PACKAGEROOT}/bin/ignore
+		prev ignore
+		exec - test '' = 'ignore' || ${STDCMP} 2>/dev/null -s ignore ${PACKAGEROOT}/bin/ignore || { ${STDMV} ${PACKAGEROOT}/bin/ignore ${PACKAGEROOT}/bin/ignore.old 2>/dev/null || true; ${STDCP} ignore ${PACKAGEROOT}/bin/ignore ;}
+	done ${PACKAGEROOT}/bin/ignore generated
+	make ${PACKAGEROOT}/bin/mamprobe
+		make mamprobe
+			meta mamprobe %.sh>% mamprobe.sh mamprobe
+			make mamprobe.sh
+			done mamprobe.sh
+			exec - case static,port:$OPTIND:$RANDOM in
+			exec - ?*:*:*|*::*|*:*:$RANDOM)
+			exec - ;;
+			exec - *) if ENV= LC_ALL=C x= $SHELL -nc '[[ a || b ]] && : ${list[level]}  !(pattern)' 2>/dev/null
+			exec - then if grep '### .*archaic.* ###' >/dev/null
+			exec - then : mamprobe contains archaic constructs :
+			exec - else ENV= LC_ALL=C $SHELL -n mamprobe.sh
+			exec - fi
+			exec - fi
+			exec - ;;
+			exec - esac
+			exec - case '${mam_cc_SHELLMAGIC}' in
+			exec - "") case 0 in
+			exec - 0) cp mamprobe.sh mamprobe
+			exec - ;;
+			exec - *) {
+			exec - i=`(read x; echo $x) < mamprobe.sh`
+			exec - case $i in
+			exec - '#!'*|*'||'*|':'*|'":"'*|"':'"*) echo "$i" ;;
+			exec - esac
+			exec - cat - mamprobe.sh <<'!'
+			exec -
+			exec - !
+			exec - } > mamprobe
+			exec - ;;
+			exec - esac
+			exec - ;;
+			exec - *) cat - mamprobe.sh > mamprobe <<'!'
+			exec - ${mam_cc_SHELLMAGIC}
+			exec -
+			exec - !
+			exec - ;;
+			exec - esac
+			exec - test -w mamprobe -a -x mamprobe || chmod u+w,+x mamprobe
+		done mamprobe generated
+		exec - test '' = 'mamprobe' || ${STDCMP} 2>/dev/null -s mamprobe ${PACKAGEROOT}/bin/mamprobe || { ${STDMV} ${PACKAGEROOT}/bin/mamprobe ${PACKAGEROOT}/bin/mamprobe.old 2>/dev/null || true; ${STDCP} mamprobe ${PACKAGEROOT}/bin/mamprobe ;}
+	done ${PACKAGEROOT}/bin/mamprobe generated
+	make ${PACKAGEROOT}/bin/package
+		prev package
+		exec - test '' = 'package' || ${STDCMP} 2>/dev/null -s package ${PACKAGEROOT}/bin/package || { ${STDMV} ${PACKAGEROOT}/bin/package ${PACKAGEROOT}/bin/package.old 2>/dev/null || true; ${STDCP} package ${PACKAGEROOT}/bin/package ;}
+	done ${PACKAGEROOT}/bin/package generated
+	make ${PACKAGEROOT}/bin/silent
+		prev silent
+		exec - test '' = 'silent' || ${STDCMP} 2>/dev/null -s silent ${PACKAGEROOT}/bin/silent || { ${STDMV} ${PACKAGEROOT}/bin/silent ${PACKAGEROOT}/bin/silent.old 2>/dev/null || true; ${STDCP} silent ${PACKAGEROOT}/bin/silent ;}
+	done ${PACKAGEROOT}/bin/silent generated
+	make ${INSTALLROOT}/bin/crossexec
+		prev crossexec
+		exec - test '' = 'crossexec' || ${STDCMP} 2>/dev/null -s crossexec ${INSTALLROOT}/bin/crossexec || { ${STDMV} ${INSTALLROOT}/bin/crossexec ${INSTALLROOT}/bin/crossexec.old 2>/dev/null || true; ${STDCP} crossexec ${INSTALLROOT}/bin/crossexec ;}
+	done ${INSTALLROOT}/bin/crossexec generated
+	make ${INSTALLROOT}/bin/ditto
+		prev ditto
+		exec - test '' = 'ditto' || ${STDCMP} 2>/dev/null -s ditto ${INSTALLROOT}/bin/ditto || { ${STDMV} ${INSTALLROOT}/bin/ditto ${INSTALLROOT}/bin/ditto.old 2>/dev/null || true; ${STDCP} ditto ${INSTALLROOT}/bin/ditto ;}
+	done ${INSTALLROOT}/bin/ditto generated
+	make ${INSTALLROOT}/bin/filter
+		prev filter
+		exec - test '' = 'filter' || ${STDCMP} 2>/dev/null -s filter ${INSTALLROOT}/bin/filter || { ${STDMV} ${INSTALLROOT}/bin/filter ${INSTALLROOT}/bin/filter.old 2>/dev/null || true; ${STDCP} filter ${INSTALLROOT}/bin/filter ;}
+	done ${INSTALLROOT}/bin/filter generated
+	make ${PACKAGEROOT}/lib/package
+		exec - if test ! -d ${PACKAGEROOT}/lib/package
+		exec - then mkdir -p ${PACKAGEROOT}/lib/package
+		exec - fi
+	done ${PACKAGEROOT}/lib/package generated
+	make ${PACKAGEROOT}/lib/package/package.mk
+		prev ${PACKAGEROOT}/lib/package
+		make package.mk
+		done package.mk
+		exec - test '' = 'package.mk' || ${STDCMP} 2>/dev/null -s package.mk ${PACKAGEROOT}/lib/package/package.mk || { ${STDMV} ${PACKAGEROOT}/lib/package/package.mk ${PACKAGEROOT}/lib/package/package.mk.old 2>/dev/null || true; ${STDCP} package.mk ${PACKAGEROOT}/lib/package/package.mk ;}
+	done ${PACKAGEROOT}/lib/package/package.mk generated
+	make ${PACKAGEROOT}/lib/package/CONVERT.mk
+		make CONVERT.mk
+		done CONVERT.mk
+		exec - test '' = 'CONVERT.mk' || ${STDCMP} 2>/dev/null -s CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk || { ${STDMV} ${PACKAGEROOT}/lib/package/CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk.old 2>/dev/null || true; ${STDCP} CONVERT.mk ${PACKAGEROOT}/lib/package/CONVERT.mk ;}
+	done ${PACKAGEROOT}/lib/package/CONVERT.mk generated
+	make ${INSTALLROOT}/lib/make
+		exec - if test ! -d ${INSTALLROOT}/lib/make
+		exec - then mkdir -p ${INSTALLROOT}/lib/make
+		exec - fi
+	done ${INSTALLROOT}/lib/make generated
+	make ${INSTALLROOT}/lib/make/package.mk
+		prev ${INSTALLROOT}/lib/make
+		prev package.mk
+		exec - test '' = 'package.mk' || ${STDCMP} 2>/dev/null -s package.mk ${INSTALLROOT}/lib/make/package.mk || { ${STDMV} ${INSTALLROOT}/lib/make/package.mk ${INSTALLROOT}/lib/make/package.mk.old 2>/dev/null || true; ${STDCP} package.mk ${INSTALLROOT}/lib/make/package.mk ;}
+	done ${INSTALLROOT}/lib/make/package.mk generated
+	make ${INSTALLROOT}/lib/make/PROBE.mk
+		make PROBE.mk
+		done PROBE.mk
+		exec - test '' = 'PROBE.mk' || ${STDCMP} 2>/dev/null -s PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk || { ${STDMV} ${INSTALLROOT}/lib/make/PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk.old 2>/dev/null || true; ${STDCP} PROBE.mk ${INSTALLROOT}/lib/make/PROBE.mk ;}
+	done ${INSTALLROOT}/lib/make/PROBE.mk generated
+	make ${INSTALLROOT}/lib/make/TEST.mk
+		make TEST.mk
+		done TEST.mk
+		exec - test '' = 'TEST.mk' || ${STDCMP} 2>/dev/null -s TEST.mk ${INSTALLROOT}/lib/make/TEST.mk || { ${STDMV} ${INSTALLROOT}/lib/make/TEST.mk ${INSTALLROOT}/lib/make/TEST.mk.old 2>/dev/null || true; ${STDCP} TEST.mk ${INSTALLROOT}/lib/make/TEST.mk ;}
+	done ${INSTALLROOT}/lib/make/TEST.mk generated
+	make ${INSTALLROOT}/lib/make/WWW.mk
+		make WWW.mk
+		done WWW.mk
+		exec - test '' = 'WWW.mk' || ${STDCMP} 2>/dev/null -s WWW.mk ${INSTALLROOT}/lib/make/WWW.mk || { ${STDMV} ${INSTALLROOT}/lib/make/WWW.mk ${INSTALLROOT}/lib/make/WWW.mk.old 2>/dev/null || true; ${STDCP} WWW.mk ${INSTALLROOT}/lib/make/WWW.mk ;}
+	done ${INSTALLROOT}/lib/make/WWW.mk generated
+	make ${INSTALLROOT}/lib/make/MSGFUN.mk
+		make MSGFUN.mk
+		done MSGFUN.mk
+		exec - test '' = 'MSGFUN.mk' || ${STDCMP} 2>/dev/null -s MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk.old 2>/dev/null || true; ${STDCP} MSGFUN.mk ${INSTALLROOT}/lib/make/MSGFUN.mk ;}
+	done ${INSTALLROOT}/lib/make/MSGFUN.mk generated
+	make ${INSTALLROOT}/lib/make/MSGKEY.mk
+		make MSGKEY.mk
+		done MSGKEY.mk
+		exec - test '' = 'MSGKEY.mk' || ${STDCMP} 2>/dev/null -s MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk.old 2>/dev/null || true; ${STDCP} MSGKEY.mk ${INSTALLROOT}/lib/make/MSGKEY.mk ;}
+	done ${INSTALLROOT}/lib/make/MSGKEY.mk generated
+	make ${INSTALLROOT}/lib/make/MAPLIB.mk
+		make MAPLIB.mk
+		done MAPLIB.mk
+		exec - test '' = 'MAPLIB.mk' || ${STDCMP} 2>/dev/null -s MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk || { ${STDMV} ${INSTALLROOT}/lib/make/MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk.old 2>/dev/null || true; ${STDCP} MAPLIB.mk ${INSTALLROOT}/lib/make/MAPLIB.mk ;}
+	done ${INSTALLROOT}/lib/make/MAPLIB.mk generated
+	make ${INSTALLROOT}/bin/mamake
+		prev mamake
+		exec - test '' = 'mamake' || ${STDCMP} 2>/dev/null -s mamake ${INSTALLROOT}/bin/mamake || { ${STDMV} ${INSTALLROOT}/bin/mamake ${INSTALLROOT}/bin/mamake.old 2>/dev/null || true; ${STDCP} mamake ${INSTALLROOT}/bin/mamake ;}
+	done ${INSTALLROOT}/bin/mamake generated
+	make ${INSTALLROOT}/bin/proto
+		prev proto
+		exec - test '' = 'proto' || ${STDCMP} 2>/dev/null -s proto ${INSTALLROOT}/bin/proto || { ${STDMV} ${INSTALLROOT}/bin/proto ${INSTALLROOT}/bin/proto.old 2>/dev/null || true; ${STDCP} proto ${INSTALLROOT}/bin/proto ;}
+	done ${INSTALLROOT}/bin/proto generated
+	make ${INSTALLROOT}/bin/ratz
+		prev ratz
+		exec - test '' = 'ratz' || ${STDCMP} 2>/dev/null -s ratz ${INSTALLROOT}/bin/ratz || { ${STDMV} ${INSTALLROOT}/bin/ratz ${INSTALLROOT}/bin/ratz.old 2>/dev/null || true; ${STDCP} ratz ${INSTALLROOT}/bin/ratz ;}
+	done ${INSTALLROOT}/bin/ratz generated
+	make ${INSTALLROOT}/bin/release
+		prev release
+		exec - test '' = 'release' || ${STDCMP} 2>/dev/null -s release ${INSTALLROOT}/bin/release || { ${STDMV} ${INSTALLROOT}/bin/release ${INSTALLROOT}/bin/release.old 2>/dev/null || true; ${STDCP} release ${INSTALLROOT}/bin/release ;}
+	done ${INSTALLROOT}/bin/release generated
+	make ${INSTALLROOT}/bin/mkdir
+		make mkdir.sh
+		done mkdir.sh
+		exec - if test ! -x ${INSTALLROOT}/bin/mkdir -a -x /bin/mkdir
+		exec - then mkdir -p 2>/dev/null || :
+		exec - if test -d ./-p
+		exec - then rmdir ./-p
+		exec - cp mkdir.sh ${INSTALLROOT}/bin/mkdir
+		exec - chmod +x ${INSTALLROOT}/bin/mkdir
+		exec - fi
+		exec - fi
+	done ${INSTALLROOT}/bin/mkdir generated
+	make ${INSTALLROOT}/bin/.paths
+		exec - if test ! -f ${INSTALLROOT}/bin/.paths -o -w ${INSTALLROOT}/bin/.paths
+		exec - then N='
+		exec - '
+		exec - H=${mam_cc_HOSTTYPE}
+		exec - P=""
+		exec - b= f= h= l= n= p= u= B= L=
+		exec - set : $P
+		exec - while :
+		exec - do while :
+		exec - do case $1 in
+		exec - '') break 2 ;;
+		exec - :) shift; break ;;
+		exec - esac
+		exec - shift
+		exec - done
+		exec - case $# in
+		exec - 0|1) break ;;
+		exec - esac
+		exec - case $L in
+		exec - ?*) L="$L|" ;;
+		exec - esac
+		exec - L="$L$2=*"
+		exec - B=$1
+		exec - done
+		exec - if test -f ${INSTALLROOT}/bin/.paths
+		exec - then while read x
+		exec - do case $x in
+		exec - *\$\(\"*) break
+		exec - ;;
+		exec - '#'?*) case $h in
+		exec - '') h=$x ;;
+		exec - esac
+		exec - ;;
+		exec - $L) l=$x
+		exec - ;;
+		exec - *BUILTIN_LIB=*) b=$x
+		exec - ;;
+		exec - *FPATH=*) f=$x
+		exec - ;;
+		exec - *PLUGIN_LIB=*) p=$x
+		exec - ;;
+		exec - *) case $u in
+		exec - ?*) u=$u$N ;;
+		exec - esac
+		exec - u=$u$x
+		exec - ;;
+		exec - esac
+		exec - done < ${INSTALLROOT}/bin/.paths
+		exec - fi
+		exec - ifs=$IFS
+		exec - m=
+		exec - case $p in
+		exec - ?*) b=
+		exec - ;;
+		exec - esac
+		exec - case $b in
+		exec - ?*) IFS='='
+		exec - set $b
+		exec - IFS=$ifs
+		exec - shift
+		exec - p="PLUGIN_LIB=$*"
+		exec - case $b in
+		exec - [Nn][Oo]*) p=no$p ;;
+		exec - esac
+		exec - m=1
+		exec - ;;
+		exec - esac
+		exec - case $f in
+		exec - '') f="FPATH=../fun"
+		exec - m=1
+		exec - ;;
+		exec - esac
+		exec - case $h in
+		exec - '') h='# use { no NO } prefix to permanently disable #' ;;
+		exec - esac
+		exec - case $l in
+		exec - '') set x x : $P
+		exec - l=
+		exec - while :
+		exec - do while :
+		exec - do case $# in
+		exec - 0) break ;;
+		exec - esac
+		exec - x=$1
+		exec - shift
+		exec - case $x in
+		exec - :) break ;;
+		exec - esac
+		exec - done
+		exec - case $# in
+		exec - 0|1) break
+		exec - ;;
+		exec - 2) l=$2
+		exec - ;;
+		exec - *) case "$H" in
+		exec - $3) l=$2; break ;;
+		exec - esac
+		exec - ;;
+		exec - esac
+		exec - done
+		exec - case $l in
+		exec - '') if test -x /lib/dld.sl
+		exec - then l=SHLIB_PATH
+		exec - elif test -x /usr/lib/dyld
+		exec - then l=DYLD_LIBRARY_PATH
+		exec - else case "$H" in
+		exec - ibm.*|mvs.*)
+		exec - l=LIBPATH
+		exec - ;;
+		exec - sgi.mips3)
+		exec - l=LD_LIBRARYN32_PATH
+		exec - ;;
+		exec - sgi.mips4)
+		exec - l=LD_LIBRARYN64_PATH
+		exec - ;;
+		exec - *) l=LD_LIBRARY_PATH
+		exec - ;;
+		exec - esac
+		exec - fi
+		exec - ;;
+		exec - esac
+		exec - case $l in
+		exec - ?*) case $B in
+		exec - '') B=lib ;;
+		exec - esac
+		exec - l="$l=../$B"
+		exec - m=1
+		exec - ;;
+		exec - esac
+		exec - ;;
+		exec - esac
+		exec - case $p in
+		exec - '') p="PLUGIN_LIB=cmd"
+		exec - case '' in
+		exec - '') p=no$p ;;
+		exec - esac
+		exec - m=1
+		exec - ;;
+		exec - esac
+		exec - case $m in
+		exec - 1) case $u in
+		exec - ?*) u=$N$u ;;
+		exec - esac
+		exec - echo "$h$N$p$N$f$N$l$u" > ${INSTALLROOT}/bin/.paths
+		exec - ;;
+		exec - esac
+		exec - fi
+	done ${INSTALLROOT}/bin/.paths generated
+	make ${INSTALLROOT}/lib/probe/C
+		exec - if test ! -d ${INSTALLROOT}/lib/probe/C
+		exec - then mkdir -p ${INSTALLROOT}/lib/probe/C
+		exec - fi
+	done ${INSTALLROOT}/lib/probe/C generated
+	make ${INSTALLROOT}/lib/probe/C/probe
+		prev ${INSTALLROOT}/lib/probe/C
+		prev C+probe
+		exec - test '' = 'C+probe' || ${STDCMP} 2>/dev/null -s C+probe ${INSTALLROOT}/lib/probe/C/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/probe ${INSTALLROOT}/lib/probe/C/probe.old 2>/dev/null || true; ${STDCP} C+probe ${INSTALLROOT}/lib/probe/C/probe ;}
+	done ${INSTALLROOT}/lib/probe/C/probe generated
+	make ${INSTALLROOT}/lib/probe/C/make
+		exec - if test ! -d ${INSTALLROOT}/lib/probe/C/make
+		exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/make
+		exec - fi
+	done ${INSTALLROOT}/lib/probe/C/make generated
+	prev ${INSTALLROOT}/lib/probe/C/make
+	make ${INSTALLROOT}/lib/probe/C/pp
+		exec - if test ! -d ${INSTALLROOT}/lib/probe/C/pp
+		exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/pp
+		exec - fi
+	done ${INSTALLROOT}/lib/probe/C/pp generated
+	prev ${INSTALLROOT}/lib/probe/C/pp
+	make ${INSTALLROOT}/lib/probe/C/mam
+		exec - if test ! -d ${INSTALLROOT}/lib/probe/C/mam
+		exec - then mkdir -p ${INSTALLROOT}/lib/probe/C/mam
+		exec - fi
+	done ${INSTALLROOT}/lib/probe/C/mam generated
+	make ${INSTALLROOT}/lib/probe/C/mam/probe
+		prev ${INSTALLROOT}/lib/probe/C/mam
+		prev mprobe
+		exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/probe ${INSTALLROOT}/lib/probe/C/mam/probe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/probe ;}
+	done ${INSTALLROOT}/lib/probe/C/mam/probe generated
+	make ${INSTALLROOT}/lib/probe/C/mam/mprobe
+		prev mprobe
+		exec - test '' = 'mprobe' || ${STDCMP} 2>/dev/null -s mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/mam/mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe.old 2>/dev/null || true; ${STDCP} mprobe ${INSTALLROOT}/lib/probe/C/mam/mprobe ;}
+	done ${INSTALLROOT}/lib/probe/C/mam/mprobe generated
+	make ${INSTALLROOT}/lib/probe/C/make/probe
+		prev probe
+		exec - test '' = 'probe' || ${STDCMP} 2>/dev/null -s probe ${INSTALLROOT}/lib/probe/C/make/probe || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe ${INSTALLROOT}/lib/probe/C/make/probe.old 2>/dev/null || true; ${STDCP} probe ${INSTALLROOT}/lib/probe/C/make/probe ;}
+	done ${INSTALLROOT}/lib/probe/C/make/probe generated
+	make ${INSTALLROOT}/lib/probe/C/make/probe.ini
+		make probe.ini
+			make probe.win32
+			done probe.win32
+			exec - t=${mam_cc_HOSTTYPE}
+			exec - ifs=$IFS
+			exec - IFS=.
+			exec - set x $t
+			exec - IFS=$ifs
+			exec - t=$2
+			exec - set x probe.win32
+			exec - while :
+			exec - do shift
+			exec - case $# in
+			exec - 0) break ;;
+			exec - esac
+			exec - case $1 in
+			exec - *probe.$t)
+			exec - break
+			exec - esac
+			exec - done
+			exec - case $1 in
+			exec - ?*) cmp -s $1 probe.ini || cp $1 probe.ini ;;
+			exec - *) : > probe.ini
+			exec - esac
+		done probe.ini generated
+		exec - test '' = 'probe.ini' || ${STDCMP} 2>/dev/null -s probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini || { ${STDMV} ${INSTALLROOT}/lib/probe/C/make/probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini.old 2>/dev/null || true; ${STDCP} probe.ini ${INSTALLROOT}/lib/probe/C/make/probe.ini ;}
+	done ${INSTALLROOT}/lib/probe/C/make/probe.ini generated
+	make ${INSTALLROOT}/include/ast
+		exec - if test ! -d ${INSTALLROOT}/include/ast
+		exec - then mkdir -p ${INSTALLROOT}/include/ast
+		exec - fi
+	done ${INSTALLROOT}/include/ast generated
+	make ${INSTALLROOT}/include/ast/prototyped.h
+		prev ${INSTALLROOT}/include/ast
+		make prototyped.h
+			prev ${INSTALLROOT}/bin/proto
+			exec - proto -f /dev/null > h.${COTEMP}.h
+			exec - if cmp 2>/dev/null -s h.${COTEMP}.h prototyped.h
+			exec - then rm -f h.${COTEMP}.h
+			exec - else mv h.${COTEMP}.h prototyped.h
+			exec - fi
+		done prototyped.h generated
+		exec - test '' = 'prototyped.h' || ${STDCMP} 2>/dev/null -s prototyped.h ${INSTALLROOT}/include/ast/prototyped.h || { ${STDMV} ${INSTALLROOT}/include/ast/prototyped.h ${INSTALLROOT}/include/ast/prototyped.h.old 2>/dev/null || true; ${STDCP} prototyped.h ${INSTALLROOT}/include/ast/prototyped.h ;}
+	done ${INSTALLROOT}/include/ast/prototyped.h generated
+	make ${INSTALLROOT}/lib/lib
+		exec - if test ! -d ${INSTALLROOT}/lib/lib
+		exec - then mkdir -p ${INSTALLROOT}/lib/lib
+		exec - fi
+	done ${INSTALLROOT}/lib/lib generated
+	make ${INSTALLROOT}/lib/lib/dl
+		prev ${INSTALLROOT}/lib/lib
+		make dl.req
+			make dl.c
+			done dl.c
+			exec - set -
+			exec - r='-'
+			exec - for i in dl.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in dl -
+			exec - do case $p in
+			exec - -) if ${CC} -o dl.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o dl.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > dl.req
+			exec - rm -f dl.exe dl
+		done dl.req generated
+		exec - test '' = 'dl.req' || ${STDCMP} 2>/dev/null -s dl.req ${INSTALLROOT}/lib/lib/dl || { ${STDMV} ${INSTALLROOT}/lib/lib/dl ${INSTALLROOT}/lib/lib/dl.old 2>/dev/null || true; ${STDCP} dl.req ${INSTALLROOT}/lib/lib/dl ;}
+	done ${INSTALLROOT}/lib/lib/dl generated
+	make ${INSTALLROOT}/lib/lib/iconv
+		make iconv.req
+			make iconv.c
+			done iconv.c
+			exec - set -
+			exec - r='-'
+			exec - for i in iconv.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in iconv -
+			exec - do case $p in
+			exec - -) if ${CC} -o iconv.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o iconv.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > iconv.req
+			exec - rm -f iconv.exe iconv
+		done iconv.req generated
+		exec - test '' = 'iconv.req' || ${STDCMP} 2>/dev/null -s iconv.req ${INSTALLROOT}/lib/lib/iconv || { ${STDMV} ${INSTALLROOT}/lib/lib/iconv ${INSTALLROOT}/lib/lib/iconv.old 2>/dev/null || true; ${STDCP} iconv.req ${INSTALLROOT}/lib/lib/iconv ;}
+	done ${INSTALLROOT}/lib/lib/iconv generated
+	make ${INSTALLROOT}/lib/lib/w
+		make w.req
+			make w.c
+			done w.c
+			make w2.c
+			done w2.c
+			exec - set -
+			exec - r='-'
+			exec - for i in w.c w2.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in w -
+			exec - do case $p in
+			exec - -) if ${CC} -o w.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o w.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > w.req
+			exec - rm -f w.exe w w2
+		done w.req generated
+		exec - test '' = 'w.req' || ${STDCMP} 2>/dev/null -s w.req ${INSTALLROOT}/lib/lib/w || { ${STDMV} ${INSTALLROOT}/lib/lib/w ${INSTALLROOT}/lib/lib/w.old 2>/dev/null || true; ${STDCP} w.req ${INSTALLROOT}/lib/lib/w ;}
+	done ${INSTALLROOT}/lib/lib/w generated
+	make ${INSTALLROOT}/lib/lib/intl
+		make intl.req
+			make intl.c
+			done intl.c
+			exec - set -
+			exec - r='-'
+			exec - for i in intl.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in intl -
+			exec - do case $p in
+			exec - -) if ${CC} -o intl.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o intl.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > intl.req
+			exec - rm -f intl.exe intl
+		done intl.req generated
+		exec - test '' = 'intl.req' || ${STDCMP} 2>/dev/null -s intl.req ${INSTALLROOT}/lib/lib/intl || { ${STDMV} ${INSTALLROOT}/lib/lib/intl ${INSTALLROOT}/lib/lib/intl.old 2>/dev/null || true; ${STDCP} intl.req ${INSTALLROOT}/lib/lib/intl ;}
+	done ${INSTALLROOT}/lib/lib/intl generated
+	make ${INSTALLROOT}/lib/lib/m
+		make m.req
+			make m.c
+			done m.c
+			make m2.c
+			done m2.c
+			make m3.c
+			done m3.c
+			make m4.c
+			done m4.c
+			make m5.c
+			done m5.c
+			make m6.c
+			done m6.c
+			exec - set -
+			exec - r='-'
+			exec - for i in m.c m2.c m3.c m4.c m5.c m6.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in m -
+			exec - do case $p in
+			exec - -) if ${CC} -o m.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o m.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > m.req
+			exec - rm -f m.exe m m2 m3 m4 m5 m6
+		done m.req generated
+		exec - test '' = 'm.req' || ${STDCMP} 2>/dev/null -s m.req ${INSTALLROOT}/lib/lib/m || { ${STDMV} ${INSTALLROOT}/lib/lib/m ${INSTALLROOT}/lib/lib/m.old 2>/dev/null || true; ${STDCP} m.req ${INSTALLROOT}/lib/lib/m ;}
+	done ${INSTALLROOT}/lib/lib/m generated
+	make ${INSTALLROOT}/lib/lib/nsl
+		make nsl.req
+			make nsl.c
+			done nsl.c
+			exec - set -
+			exec - r='-'
+			exec - for i in nsl.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in nsl -
+			exec - do case $p in
+			exec - -) if ${CC} -o nsl.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o nsl.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > nsl.req
+			exec - rm -f nsl.exe nsl
+		done nsl.req generated
+		exec - test '' = 'nsl.req' || ${STDCMP} 2>/dev/null -s nsl.req ${INSTALLROOT}/lib/lib/nsl || { ${STDMV} ${INSTALLROOT}/lib/lib/nsl ${INSTALLROOT}/lib/lib/nsl.old 2>/dev/null || true; ${STDCP} nsl.req ${INSTALLROOT}/lib/lib/nsl ;}
+	done ${INSTALLROOT}/lib/lib/nsl generated
+	make ${INSTALLROOT}/lib/lib/socket
+		make socket.req
+			make socket.c
+			done socket.c
+			prev nsl.c
+			exec - set -
+			exec - r='-'
+			exec - for i in socket.c nsl.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in socket -
+			exec - do case $p in
+			exec - -) if ${CC} -o socket.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o socket.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > socket.req
+			exec - rm -f socket.exe socket nsl
+		done socket.req generated
+		exec - test '' = 'socket.req' || ${STDCMP} 2>/dev/null -s socket.req ${INSTALLROOT}/lib/lib/socket || { ${STDMV} ${INSTALLROOT}/lib/lib/socket ${INSTALLROOT}/lib/lib/socket.old 2>/dev/null || true; ${STDCP} socket.req ${INSTALLROOT}/lib/lib/socket ;}
+	done ${INSTALLROOT}/lib/lib/socket generated
+	make ${INSTALLROOT}/lib/lib/dbm
+		make dbm.req
+			make db.c
+			done db.c
+			make gdbm.c
+			done gdbm.c
+			make gdbm1.c
+				make gdbm-ndbm.h implicit
+				done gdbm-ndbm.h dontcare virtual
+			done gdbm1.c
+			make gdbm2.c
+				make ndbm.h implicit
+				done ndbm.h dontcare virtual
+			done gdbm2.c
+			exec - set -
+			exec - r='-'
+			exec - for i in db.c gdbm.c gdbm1.c gdbm2.c
+			exec - do if ${CC} -c $i > /dev/null
+			exec - then g=
+			exec - for p in db - gdbm_compat - gdbm - ndbm - dbm -
+			exec - do case $p in
+			exec - -) if ${CC} -o dbm.exe $i $g > /dev/null 2>&1
+			exec - then ${CC} -o dbm.exe $i > /dev/null 2>&1 || {
+			exec - r="$g"
+			exec - break 2
+			exec - }
+			exec - fi
+			exec - g=
+			exec - ;;
+			exec - *) g="$g -l$p"
+			exec - ;;
+			exec - esac
+			exec - done
+			exec - fi
+			exec - done 2>/dev/null
+			exec - echo " $r" > dbm.req
+			exec - rm -f dbm.exe db gdbm gdbm1 gdbm2
+		done dbm.req generated
+		exec - test '' = 'dbm.req' || ${STDCMP} 2>/dev/null -s dbm.req ${INSTALLROOT}/lib/lib/dbm || { ${STDMV} ${INSTALLROOT}/lib/lib/dbm ${INSTALLROOT}/lib/lib/dbm.old 2>/dev/null || true; ${STDCP} dbm.req ${INSTALLROOT}/lib/lib/dbm ;}
+	done ${INSTALLROOT}/lib/lib/dbm generated
+done install virtual
+make test
+	make test.iffe
+		prev iffe
+		make iffe.tst
+		done iffe.tst
+		exec - regress iffe.tst iffe
+	done test.iffe virtual
+	make test.mamake
+		prev mamake
+		make mamake.tst
+			meta mamake.tst %.rt>%.tst mamake.rt mamake
+			make mamake.rt
+			done mamake.rt
+			exec - if [[ "1" || "mamake.rt" -nt "mamake.tst" ]]
+			exec - then mktest --style=regress mamake.rt > mamake.tst
+			exec - fi
+		done mamake.tst generated
+		exec - regress mamake.tst mamake
+	done test.mamake virtual
+done test dontcare virtual

+ 13 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/PROBE.mk

@@ -0,0 +1,13 @@
+/*
+ * @(#)probe (AT&T Bell Laboratories) 11/11/91
+ *
+ * <lang> <tool> :PROBE: *.probe *.sh *
+ *
+ * common probe script installation
+ * generates probe.sh and probe in .
+ */
+
+":PROBE:" : .MAKE .OPERATOR
+	probe.sh : $(LIBDIR)/probe/$(<:O=1)/probe $(>:N=*.(probe|sh))
+		cat $(*) > $(<)
+	$(LIBDIR)/probe/$(<:O=1)/$(<:O=2) :INSTALLDIR: probe $(>:N!=*.(probe|sh))

+ 934 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/RELEASE

@@ -0,0 +1,934 @@
+12-07-17 iffe.sh: add C code NOTE("...") to amend --verbose output
+12-06-26 iffe.sh: fix "npt foo" to handle function-like macro foo()
+12-06-20 package.sh: use $KSH for rt in "results test"
+12-06-15 Makefile: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-15 package.sh: add PLUGIN_LIB to $INSTALLROOT/bin/.paths and BUILTIN_LIB => PLUGIN_LIB
+12-06-13 package.sh: handle admin.db column output
+12-06-08 iffe.sh: fix 12-06-06 typo
+12-06-06 iffe.sh: check for -l* in reverse and accumulative order (e.g., for -last & -lm)
+12-06-04 package.sh: always check $INSTALLROOT/lib/package/profile
+12-05-31 Makefile: ID=ast; $(INSTALLROOT)/prototyped.h => $(INSTALLROOT)/$(ID)/prototyped.h
+12-05-28 iffe.sh: api foo YYYYMMDD => FOOAPI(rel) test macro
+12-05-24 package.sh: change admin.db comment => owner attributes
+12-04-25 ratz.c: add sear -k option to keep installation tmp dir on exit
+12-04-17 package.sh: skip sh version logic for ``use''
+12-04-17 cc.ibm.risc*: _LARGEFILE64_SOURCE => _LARGE_FILE_API moved to libast/features
+12-04-09 cc.ibm.risc*: speak aixese for _LARGEFILE64_SOURCE
+12-02-29 cc.darwin.i386*: handle default cc vs kernel bittedness
+12-02-29 C+probe: add __TIMESTAMP__ to the nopredefined list
+12-02-29 package.sh: don't assume grep -q or /usr/local/lib in LD_LIBRARY_PATH
+12-02-29 package.sh: fix ksh vs -lcmd compatibility checks
+12-02-23 iffe.sh: checkcc() before checkread() for sensible diagnostics
+12-02-14 package.mk: { --clobber --compare --link=lib*.a* } for --mam=static
+12-02-14 package.mk: export LICENSEFILEDEFAULT instead of LICENSEFILE
+12-02-14 package.sh: handle @(cc|ld).${HOSTTYPE}* intercepts
+12-02-07 package.sh: add { clean clobber } actions
+12-02-02 regress.sh: fix ulimit -c defaults for --nokeep
+12-01-18 regress.sh: add INPUT|OUTPUT|ERROR -e 'filter' to filter before comparison
+12-01-21 package.sh: fix `admin make' bug that created unused $INSTALLROOT/lib
+12-01-21 Makefile: :PACKAGE: license=ast -- oops
+12-01-20 cc.darwin,cc.mvs.390: tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+12-01-12 package.sh: add admin make share closure to handle alternate HOSTTYPEs
+11-12-13 iffe.sh: add /*<NOSTDIO>*/ test code comment to disable default #include <stdio.h>
+11-11-11 C+probe: test for .so before .sl
+11-10-26 package.sh: don't forget about *.pkg for admin update
+11-10-18 cc.*-icc: update and add more
+11-10-11 package.sh: handle package make|view when no source installed
+11-09-11 package.sh: count admin '*** termination code' errors
+11-08-31 mamake.c: add -e, ignore use recursive prereq timestamps
+11-08-29 iffe.sh: add ``set stdio try1.h - try2.h ...''
+11-08-29 iffe.sh: trap EXIT => trap 0 for ancient sh
+11-08-11 iffe.sh: handle ancient sort that doesn't have -k
+11-06-01 make.probe: add more /lib64 logic
+11-05-01 package.sh: fix admin ditto to sync LICENSES too
+11-03-25 package.sh: initialize { $SED $TR } before first use!
+11-03-21 package.sh: fix vpath probes
+11-03-17 iffe.sh: fix cleanup to rm $tmp* instead of $tmp*.*
+11-02-24 package.sh: change curl usage to "curl -L ..."
+11-02-11 package.sh,C+probe,make.probe,mamprobe.sh: add ###.*archaic.*###
+11-02-02 Makefile: add :MAPLIB: check for ancient -lw
+11-02-02 make.probe: handle -print-multi-directory => 64 => /usr/lib64 /lib64
+11-02-02 package.sh: HOSTTYPE=*,*cc*[,-*,...] sets CC [ and CCFLAGS ]
+11-02-02 make.probe: handle gcc $ORIGIN link but exec failure -- gee thanks
+11-01-25 cc.hp.ia64: bundled cc is a pile of shaving cream
+11-01-07 iffe.sh: check debug==3 for is_hdr() failure
+10-11-22 ditto.sh: fix timing problem between |& and exec &p
+10-11-10 package.sh: fix cc cross compile check to use checkcc absolute path
+10-10-10 package.sh: list main env vars at start of make action
+10-10-10 ratz.c: tweak windows delays
+10-09-10 ratz.c: add _SEAR_ARGS for _SEAR_EXEC
+10-09-01 package.sh: fix ratz from source logic
+10-08-25 package.mk: consolidate license file search in .package.licenses.
+10-08-22 ratz.c: run sear bootstrap command detached
+10-08-20 C+probe: version_stamp only if version_flags works
+10-08-17 package.sh: unset makerules *DIR variables in env
+10-08-15 package.sh: "make" action now lists some env values
+10-08-11 mktest.sh: add "DO command ..."
+10-07-27 rt.sh: handle "rt X=Y ..."
+10-06-29 ratz.c: non-option sear args passed to sear_exec()
+10-06-25 iffe.sh: "api" op changed to not do "map-libc" type mappings
+10-06-25 package.sh: "force admin ditto" => no ditto --update option
+10-06-22 C+probe: handle cc that require .[ci] input for version info
+10-06-21 ditto.sh: change default remote access to ssh (about time)
+10-06-12 regress.sh: DIAGNOSTICS [ 1 | 0 | pattern ] and fix EXIT for all
+10-06-09 package.sh: add AT&T to usable nmake check
+10-06-06 iffe.sh,iffe.tst: add { api ver } ops
+10-04-22 package.sh: update "html binary|source" NAME/PASSWORD info
+10-04-15 iffe.sh: don't forget candidate headers for hdr|sys!
+10-04-11 WWW.mk: disable man page metarule -- now done by admin-man(1)
+10-02-14 package.sh: $CC verification needs $INSTALLROOT/bin in PATH
+10-02-11 package.sh: fix package admin make report error count
+10-02-02 package.sh: fix write binary bug that did scp on local fs
+10-02-02 package.mk: up to date binary targets must still be in PACKAGE.*.lst
+10-01-01 package.sh: fix premature $INSTALLROOT/bin during cross compile check
+10-01-01 make.probe: handle ['"] in CC.VERSION.STRING
+09-12-04 iffe.sh: add "opt name" to check for name in $PACKAGE_OPTIONS
+09-11-30 mktest.sh: change RESET to STATE.RESET to make it global
+09-11-14 make.probe: use gcc { -print-multi-directory -print-search-dirs }
+09-11-11 package.sh: re-order and combine cc checks
+09-10-27 C+probe,make.probe,probe.win32: add CC.SUFFIX.DEBUG
+09-10-21 iffe.sh,Makefile: test -e is not in ksh88!
+09-10-06 iffe.sh: handle cc -E #error with 0 exit status (sgi)
+09-10-06 package.sh: stub in ar intercept checks -- not used yet
+09-10-06 ar.ibm.risc: add ar intercept because some aix require -Xfoo first!!
+09-09-24 regress.sh: fix UMASK logic to create test support files before umask
+09-08-28 release.c: change docs to mention stdin if no file operands
+09-08-24 package.sh: fix isascii() bug that failed on od(1) trailing space
+09-08-20 make.probe: add CC.SHARED.NAME
+09-08-20 regress.sh: add { JOB CONTINUE EXITED KILL FIFO }
+09-08-11 package.sh: filter lines containing : for package results
+09-07-31 make.probe: add CC.AR.ARFLAGS (for aix ar -xany)
+09-07-31 package.sh,cc.*: fix -dumpmachine to handle 32/64/* bit options
+09-06-24 package.sh: fix admin.db output formatting
+09-05-05 package.sh: export dll hackery environment vars
+09-05-05 package.sh: handle non-identifier hostnames
+09-05-05 mamake.c: pass undefined ${...} identifiers to the shell
+09-05-05 mamake.rt: add macro expansion regression tests
+09-05-01 iffe.sh: fix output initialization *again*
+09-04-28 package.sh: handle admin.db contact field $9
+09-04-15 iffe.sh: add implicit "ini" op to initialize io for subsequent ops
+09-03-31 regress.sh: EXPORT before test => global ENVIRON[]
+09-03-26 package.sh: test fail pattern is 'fail[es]'
+09-03-26 UNIT - ... appends (options) to command line
+09-03-19 TEST.mk: x.tst => x only if x is command target
+09-03-15 regress.sh: add ${MAIN} for base name of main unit
+09-03-10 TEST.mk: add .SOURCE:tests if tests is a dir
+09-03-03 regress.sh: allow command line unit to override UNIT
+09-03-03 mktest.sh: handle IO == $'\n'
+09-02-02 package.sh: delay $INSTALLROOT/bin/.paths generation until mamprobe runs
+09-01-30 cc.mvs.390: c89 balks at [ ()] in -Dname="..."!
+09-01-27 package.sh: add isascii() to use ratz instead of tar
+09-01-20 hurl.sh: add --size=bytes option
+09-01-08 TEST.mk: add test.* prereqs, multiple arg lists with :T=*: binding
+09-01-03 regress.sh: fix UNIT to allow command line override
+09-01-03 mktest.sh: handle TWD
+08-12-24 package.sh: fix cross-compile HOSTTYPE logic
+08-12-15 package.sh,hurl.sh: handle http codes { 301 302 303 }
+08-10-16 make.probe '-fno-stack-protector -fno-stack-protector-all' to cop out!!
+08-09-30 rt.sh: fix ksh93 regression test signal count
+08-09-26 regress.sh: ignore SIGPIPE for SET pipe-input
+08-09-24 package.sh: package only test foo => make --recurse=only recurse tests foo
+08-09-20 make.probe: handle another /usr/bin/file shared lib description
+08-09-20 regress.sh: add --pipefail for SET pipe-input ...
+08-09-17 Makefile: add gdbm1.c for <gdbm-ndbm.h>
+08-09-10 make.probe: add CC.NOPROTECT
+08-08-08 mktest.sh: add --width=width
+08-08-05 dbm.req: favor sleepycat ndbm compatibility
+08-08-04 C+probe: fix stdlib initialization logic
+08-06-24 package.sh: fix $INSTALLROOT/bin/cc intercept time stamp file typo
+08-06-20 TEST.mk: make the localyunit before *.rt => *.tst -- doh
+08-06-20 mktest.sh: prepend $PWD onto PATH for local units -- doh^2
+08-06-11 regress.sh: fix bug that skipped the last test
+08-05-20 regress.sh: add --local to put *.tmp dir in local fs
+08-05-05 regress.sh: add IF command ... ELIF command ... ELSE ... FI
+08-05-01 package.sh: package test => ulimit -c 0
+08-04-28 regress.sh: fix EXPORT quoting
+08-04-28 regress.sh: fix UNIT set check args too
+08-04-24 rt.sh: exit code > 256 => signal termination
+08-04-10 C+probe: change probe_so order to check .so last (macos ld workaround)
+08-04-01 package.sh: handle multiple admin HOSTTYPEs per HOST
+08-03-28 C+probe: add C++ #include <iostream> (no extension) dir probes
+08-03-17 regress.sh: fix trap on EXIT, add terminated note to final tally
+08-02-28 make.probe: fix probe_warn to include ld!
+08-02-02 make.probe: add CC.RUNPATH to match default -L order
+08-01-31 package.sh: check lib64 for LD_LIBRARY_PATH
+08-01-31 iffe.sh: tweak ancient /bin/sh workarounds
+08-01-28 make.probe: darwin ld export dynamic is -force_flat_namespace
+08-01-28 C+probe: handle sgi cc error message but exit 0 botch(es)
+08-01-23 package.sh: fix checksum doc typo
+08-01-09 C+probe: add __FUNCTION__ to the undef (don't check) list
+07-12-14 iffe.sh: add set nooptimize
+07-12-03 package.sh: add LC_ALL=C
+07-11-27 package.sh: fix overaggressive *.md5 cleanup
+07-11-20 iffe.sh: treat exit status >= 250 as normal error with no signal
+07-11-05 package.sh: fix write op error count pattern
+07-11-05 package.mk: fix $(~req) .ver binding
+07-08-11 probe.win32: add cl.exe setuid workaround, CC.VERSION[.STRING]
+07-08-01 package.sh: handle 'package read lcl|tgz'
+07-05-08 regress.sh: execute basename instead of absolute path for short $0
+07-04-27 cc.sgi.mips[34]: for #error to exit non-zero -- a no brainer
+07-04-20 mktest.sh: defer to systems without 'grep -q' -- sigh
+07-04-11 mamprobe.sh: handle $(CC.*) => ${mam_cc_*}, $(...) => ${...}
+07-04-11 make.probe: fix CC.PICBIG probe, default { CC.PIC CC.DLL } to BIG
+07-04-04 iffe.sh: prepend ${tst}${ext} to each .c probe
+07-03-28 package.sh: fix binary tgz architecture type duplication
+07-03-28 package.mk: add binary write PACKAGE.$HOSTTYPE.lst
+07-03-28 iffe.sh: add -F header to mac test
+07-03-23 make.probe: handle file(1) that returns 'archive' for .so
+07-03-22 mamprobe.sh: fix STDED probe for implementations that ignore EOF
+07-03-11 package.sh: add nocopyright and tst => nocopyright
+07-03-11 package.mk: add copyright=0
+07-03-08 C+probe: restore IFS after probe.ini
+07-02-26 mamake.c: expand first of ${mam_lib*} for ${AR}
+07-01-05 package.sh: fix "admin write binary" logic
+07-01-01 iffe.sh: add "cmd" --verbose trace
+07-01-01 iffe.sh: sort => LC_ALL=C sort
+07-01-01 C+probe: LC_ALL=C
+06-12-22 make.probe: lean on gcc -v for stdlib, but preserve /usr/local!
+06-11-23 package.sh: *.md5 are not tarballs -- doh
+06-11-23 iffe.sh: add -F, --features=feature-test-header
+06-11-11 make.probe: favor lib64 over lib for hosttype==*64
+06-10-31 make.probe: add "-ignore-source-dir -iquote" test
+06-10-31 iffe.sh: add status{...} code block
+06-10-11 regress.sh: fix DO to handle {...} (time for regress.tst?)
+06-10-11 package.sh: handle already gunzip'd *.tgz
+06-10-06 iffe.sh: add reference for header content tests
+06-09-27 regress.sh: fix UMASK to do DO too (duh)
+06-09-22 iffe.sh: drop -O for npt tests (for msvc intrinsics)
+06-09-14 cc.darwin: drop -O until gcc 4.* gets its act together
+06-09-11 package.sh: { cc ld ldd } intercepts check ${HOSTTYPE%.*} too
+06-09-08 regress.sh: add PIPE INPUT|OUTPUT for pipe io
+06-09-05 C+probe: add { probe_version version_stamp version_string }
+06-09-05 make.probe: add version stamp comment, CC.VERSION[.STRING]
+06-08-27 regress.sh,mktest.sh: add UMASK
+06-08-25 regress.sh: add -b,--ignore-space,IGNORESPACE
+06-08-25 mktest.sh: add IGNORESPACE
+06-08-24 mktest.sh: handle \000 in data
+06-08-24 regress.sh: handle -f* for INPUT|OUTPUT|ERROR
+06-08-16 package.sh: fix 'install flat' logic
+06-08-11 rt.sh: handle style=shell %K date format
+06-07-17 ratz.c: fix __MVS__ FAR definition
+06-07-17 iffe.sh: "header x.h" -- deprecate "include x.h" for .SCAN.iffe
+06-07-17 package.sh: differentiate urls vs. assignments
+06-06-27 rt.sh: add --failed, --heading
+06-06-27 C+probe,TEST.mk,make.probe,mktest.sh,regress.sh: 'ulimit -c 0'
+06-06-26 cc.darwin.ppc: handle -lcc_dynamic disappearance
+06-06-25 mktest.sh: implement PROG
+06-06-11 Makefile: add -ldbm :MAPLIB:, provide public MAPLIB.mk
+06-05-06 package.sh: add PACKAGE_admin_tail_timeout
+06-05-22 ratz.c: upgrade to zlib-1.2.3
+06-05-09 package.sh: fix admin.db docs
+06-03-11 package.sh: fix `package use - command ...'
+06-03-05 make.probe: work around pedantic bash 3.1 mismatched " in `.`
+06-02-14 package.sh: "results failed test" == "results test failed"
+	 cc.sgi.*: add _AST_cc_OPTIONS parameterization, -OPT:Olimit=0
+	 cc.linux.ia64-icc: add for intel cc
+06-02-02 package.sh: freebsd stuck with os version for all arch
+06-02-01 package.mk: fix locale logic (tw -d requires dir arg)
+06-01-31 package.sh: require $CC only for make|test
+06-01-30 package.sh,hurl.sh: use the backwards-compatible --http-passwd
+	 package.sh: add more pdksh => /bin/sh checks
+06-01-26 package.sh: wget --http-pass => --http-password
+	 package.sh: fix wget error logic
+	 hurl.sh: wget --http-pass => --http-password
+06-01-11 package.mk: pass package.license.class to make --mam too
+	 package.mk: variants=pattern => --variants=pattern
+	 package.sh: darwin rel<=7 => darwin7.ppc
+	 package.sh: freebsd rel<=4 => freebsd4
+	 package.sh: freebsd rel<=5 => freebsd5
+05-12-07 iffe.sh: don't emit <stdio.h> if <sfio.h>|<ast.h> (XXX)
+05-12-05 make.probe: disable readonly.exe core dump via ulimit -c 0
+05-09-22 mktest.sh: add EXEC [ ++NOOUTPUT ++NOERROR ++NOEXIT ]
+05-09-21 mktest.sh: fix --style=shell compare to ignore \r
+05-09-12 TEST.mk: all --force to force %.rt regeneration
+05-09-05 TEST.mk: regenerate from %.rt only if newer, :SAVE: %.tst
+05-08-25 mktest.sh: add
+	 TEST.mk: add %.rt=>%.tst for mktest
+05-08-18 package.sh: 'package host cpu' now checks $NPROC first
+05-07-17 iffe.sh: add { define extern include print } ops
+	 iffe.sh: accept output{...}end output on success only -- doh
+05-07-01 package.sh: add TARPROBE for tar B flag probe
+05-06-24 package.sh: fix binary read chmod via *.sum
+05-06-06 package.sh: fix KEEP_HOSTTYPE logic to handle synthesized types
+05-06-01 make.probe: verify that cc_pic works for hosted cc
+	 cc.lynxos.ppc: make -mshared the default
+	 package.sh: note $INSTALLROOT/bin/@(cc|ld|ldd) installation
+05-05-25 make.probe: add CC.INCLUDE.LOCAL instead of -I- in CC.DIALECT
+05-05-24 iffe.sh: really fix grouping logic -- with tests this time
+	 package.sh: pipe/socket configuration mismatches => use /bin/sh
+05-04-28 TEST.mk: add $(TESTS)
+05-04-19 package.sh: package results test uses rt if possible
+	 iffe.sh: fix 'op var - ... - ...' grouping logic
+05-04-15 rt.sh: handle autom4ate style
+05-04-11 regress.sh: fix unit name when command line unit also specified
+	 rt.sh: handle all ast package test output formats
+	 package.sh: fix make docs for options passed to underlying make
+05-04-08 package.sh: cp -p makerules.mo to $OK to preserve mtime
+	 regress.sh: add "TITLE name" to change TEST output title
+05-04-01 rt.sh: add pretty make test + regress.sh wrapper
+05-03-29 package.sh: test -e path => test -f path -o -d path
+05-03-24 make.probe: fix CC.PICBIG probe to prefer -fPIC over -fpic -- doh
+05-03-19 mamake.c: command line name=var also defines name.FORCE=var
+05-03-11 regress.sh: unset LC_ALL when LC_* EXPORT'd
+	 package.sh: old make.out saved in circular make.out.[1-9]
+	 mamake.c: sync with nmake :W=O:
+05-03-01 package.sh: fix flat hierarchy initialization
+	 package.sh: admin action now properly resets sibling remote logs
+	 package.mk: relax unknown/unwritten package messages to warnings
+	 package.sh: handle space in command line name=value
+	 make.probe: add mvs -Wc,dll,exportall,longname,rent to CC.DLL probe
+05-02-24 package.sh: hosttype *.powerpc => *.ppc
+	 cc.lynxos.ppc,ldd.lynxos.ppc: add
+05-02-22 mamake.c: fix { -G --debug-symbols -S --strip-symbols } MAMAKEFLAGS bug
+05-02-20 probe.win32: handle /platformsdk mount
+05-02-19 package.sh,package.mk: add write tst for tgz in tst subdir
+05-02-18 package.sh: accept cc -dumpmachine with 0 or 1 -
+05-02-14 package.sh: handle multiple architectures per host in admin.db
+	 Makefile,package.sh: honor $INSTALLROOT/bin/.paths overrides
+	 package.sh: normalize trailing [-_]bits in host type
+	 iffe.sh: some ksh-compatible shells don't do *(pattern)
+05-02-11 iffe.sh: back out 05-01-11 child process stdin hijack
+	 cc.lynxos.i386: -dynamic instead of -static default
+05-02-10 package.sh: cyg usr/doc => usr/share/doc
+05-02-08 package.sh: drop -m with pax -- delta bug fixed 2005-02-08
+	 iffe.sh: work around old bash 0<... redirection bug
+05-02-06 package.mk: source.tgz: update generated files only when they change
+05-02-02 *.sh,*probe: IFS may be unset and { ash bsh } don't on startup -- wow
+05-01-11 package.sh: update setup docs to include authorize+password
+	 package.mk: fix .source.cyg final directory edit
+	 package.mk: notice=1 for conspicuous empty NOTICE file
+	 WWW.mk: fix *-index.html installation
+	 filter.sh: retain input file suffix in tmp copy
+	 mamexec.c: fix non-contiguous "exec" bug that skipped lines
+	 iffe.sh: fix candidate lib test to try grouping subsequent libs
+	 iffe.sh: fix child process stdin hijack that skipped input lines
+	 iffe.sh: --shell=osh to force read -r compatibility command
+	 iffe.sh: chop iffe input leading space before # for KnR compatibility
+05-01-05 package.sh: add ${TAR} ${TARFLAGS} and tar B flag for pipes
+	 mamake.c: fix makefile scan to ignore lib*.[hH]
+	 iffe.sh: immunize function/symbol tests from aggressive -O
+04-12-28 WWW.mk: add :WWWPAGE: faq.*.mm index generator
+04-12-21 ratz.c: make sure tmp dir is writable -- doh
+04-12-08 iffe.sh: fix dat test for aggressive -O
+04-12-01 iffe.sh: add `include file' to pull in #define's for `exp'
+04-11-11 package.sh: default MAKESKIP is "*[-.]*"
+04-10-22 ratz.c: change docs to note zlib license
+	 mamake.c: handle --debug-symbols and --strip-symbols
+	 package.sh: make (debug|strip)=1 => --(debug|strip)-symbols
+	 package.mk: add :LICENSE: => package.license.class
+	 mamake.c: fix recursive order logic
+04-10-18 package.mk: add :LICENSE:, :OMIT: to omit package subdirs
+04-10-11 package.sh: add 'authorize name' and 'password password'
+04-10-01 iffe.sh: double check $static link with ! $static
+	 Makefile: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+	 make.probe: add CC.DIALECT EXPORT={ALL,REF,EXT,DLL}
+	 package.sh: add BUILTIN_LIB to $INSTALLROOT/bin/.paths
+04-09-21 package.mk: $(init)$(name) is now an implicit prereq
+04-09-09 package.sh: copy makerules.mo to $INSTALLROOT/bin/ok
+04-09-01 package.mk,package.sh: rename *.txt => *.README
+	 package.mk: add the runtime package type (no *.[ah])
+	 iffe.sh: fix key test reports
+04-08-26 Makefile: { add m2.c m3.c } -lm tests for { frexp[l] ldexp[l] }
+04-08-11 package.mk: handle HOSTTYPE for solaris > 9
+	 package.sh: add `checkaout proto' for { make view }
+	 package.sh: check for { md5sum md5 }
+	 iffe.sh: add {if|elif|else|endif} test ...
+	 iffe.sh: add 'exp - expression' and '( expression )'
+	 iffe.sh: add 'name = test ...' user defined macros
+	 iffe.sh: add '! test ...' negation
+	 TEST.mk: add implied { .c .sh } generated prereq
+	 cc.darwin.ppc: handle 10.3 -dylib mess
+04-08-01 package.mk: let include handle nested requirements -- duh
+04-07-31 package.sh: attempt a second ping before admin assumes host down
+04-07-26 package.sh: fix hp.ia64 HOSTTYPE
+04-07-23 probe.win32: generalize #include dir order search
+04-07-17 regress.sh: add INPUT -x for chmod +x
+04-07-01 regress.sh: TMP => TWD
+04-06-29 regress.sh: put COMMAND in $TWD too
+04-06-21 regress.sh: mkdir -p INPUT and OUTPUT intermediate dirs
+	 TEST.mk: add :TEST: -- to disable .c .sh search
+04-06-18 TEST.mk: add .SCAN.tst
+04-06-17 regress.sh: TEST returns true if active, false otherwise
+	 regress.sh: add CD to change test pwd from $TWD
+04-06-16 regress.sh: add TWD for ./unit.tmp override
+	 regress.sh: DO now flushes previous test
+	 regress.sh: INPUT and OUTPUT handle -f for printf instead of print
+04-06-11 package.sh: make sure $INSTALLROOT/bin is in front of $PATH
+	 package.sh: skip nmake if older than 2000-10-31
+04-05-20 package.sh: fix arg vs. package parse with - or '' to disambuguate
+04-05-11 package.sh: package verbose update lists closure for package setup
+	 package.sh: add src/lib/libardir to nmake proto bootstrap
+	 regress.sh: probe for rm -u vs. chmod -R u+rwx
+04-05-01 package.sh: $CC must be C, not C++; allow release command on $PATH
+04-04-15 make.probe: check probe_libdir false positives
+	 package.sh: add lib/package/*.lic src package subdirs
+	 package.mk: add mamfile=0 to inhibit Mamfile generation
+	 iffe.sh: config name_DECLARED => HAVE_name_DECL
+	 iffe.sh: fix mac to handle default value
+04-04-11 iffe.sh: normalize sed [\\\\/] quoting
+04-04-04 package.mk: only checksum generated tarballs
+	 mamprobe.sh: add STDCHMOD
+04-04-01 C+probe: set export LANG=C for uniform error messages
+	 make.probe: another CC.STDLIB tweak
+	 package.sh: fix regress core dump pattern, expand [a-z] match ranges
+04-03-31 Makefile: add intl :MAPLIB: test
+	 make.probe: fix CC.STDLIB search; drop CC.* path duplicates
+04-03-28 iffe.sh: drop unused exec $stdin<&0 dup
+04-03-25 Makefile: add iconv :MAPLIB:
+	 package.sh: use ${PING:-ping -c 1 -w 4}, allowing admin.db override
+04-03-24 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: update base change on md5 sum instead of size
+	 iffe.sh: adjust case label \ and keyword quoting for ancient /bin/sh
+04-03-22 probe.win32: ncc => nld
+04-03-19 CONVERT.mk: change the instructions and old source dir default
+	 package.mk: fix recurse=list check
+	 package.mk: add *.md5 checksum for each *.(c|exe|tgz)
+	 package.sh: fix update base/delta/sync existence check
+04-03-18 iffe.sh: -d2 does not remove core dumps on exit
+04-03-17 package.sh: fix make recurse arg/action order
+04-02-29 package.sh: add regress action to compare current and previous tests
+	 package.sh: fix sgi.mips[23] HOSTTYPE test for old irix cc
+	 package.sh: add `export variable ...'
+	 package.sh: admin action now handles host name with non-id chars
+	 package.sh: non-numeric M T W in admin.db disables that action
+	 package.sh: fix admin write binary local vs. shared clash
+	 cc.hp.pa: add _AST_CC_hp_pa_DEFAULT=+DAportable
+	 cc.hp.pa64: sync with cc.hp.pa
+	 cc.ibm.risc: -bnolibpath => -blibpath:/usr/lib:/lib
+	 probe.win32: sync with make.probe
+	 make.probe: fix last chance dynamic test
+	 make.probe: add hp.pa CC.EXPORT.DYNAMIC -Wl,-E
+	 make.probe: add ibm.risc CC.EXPORT.DYNAMIC -bexpall
+	 make.probe: move probe_dll_def to the end of probe_dll
+	 package.mk: capture subcomponent mamfile recursion
+04-02-24 make.probe: strip "..." from cc/ld traces
+	 iffe.sh: add ``set [no]define'' to disable macro #define/#undef
+04-02-23 make.probe: rework CC.LD search
+04-02-14 make.probe: add CC.EXPORT.DYNAMIC for main dynamic sym export
+	 make.probe: resurrect CC.PIC with separate semantics from CC.DLL
+	 make.probe: add CC.SHARED.LD for CC.SHARED linker
+	 C+probe: clear DISPLAY to stifle interactive windows
+04-02-11 iffe.sh: handle ``siz void*'', add cross{ ... }end
+	 make.probe: add { CC.AR CC.SIZE }, fix cross command search
+	 cc.darwin.ppc: change $cc => $CC for old ksh + libast conf bug
+04-02-09 make.probe: drop -nostartfiles from CC.SHARED for C++
+04-02-04 package.sh: fix cross compilation bug that mixed binary formats
+04-02-02 package.sh: package admin now ditto's bin/package too
+04-01-30 cc.sgi.mips3: drop warning 3421
+04-01-11 regress.sh: output label#count for tests in loops
+04-01-05 regress.sh: fix bug that ignored the first SAME
+04-01-04 crossexec.sh: fix typo that did not recognize rcp
+03-12-19 mamake.c: add `foolib:foo:libfoo' to recurse()
+03-10-11 regress.sh: add EXPORT, export COLUMNS=80 for message consistency
+03-09-23 ratz.c: fix tar header number parse bug that skipped to next number
+	 regress.sh: rm cleanup now handles files matching -*
+03-09-11 iffe.sh: add unnamed { ... } blocks
+	 regress.sh: add COPY from to, like MOVE but comprison still done
+	 regress.sh: rm -rfu to handle test dirs w/o u+rwx
+03-08-14 Makefile: add hello.c to the manifest
+03-08-11 package.sh: fix `html binary' generation
+03-06-21 package.sh: fix INITROOT initialization bug
+	 package.sh: make sure admin logs exists before tail'ing
+03-06-11 probe.win32: fix $(BINDIR) typo that expanded in sh instead of make
+	 cc.mvs.390: return code 4 yields exit code 3 but it's *really* ok
+	 package.sh: fix onpath function global var conflict
+	 make.probe: add CC.DIALECT { GNU -dD }
+	 package.mk: add Mamfile to lcl manifest
+03-06-10 package.sh: fix setup action typo that only checked the INIT package
+	 package.sh: *.s390x => *.s390-64
+03-06-09 package.mk: add cyg :POSTINSTALL:
+03-06-08 make.probe: fix CC.STDLIB logic
+	 hurl.sh: add User-Agent identification
+	 package.sh: tweak source and binary installation instructions
+	 cc.hp.pa,ld.hp.pa: +-Wl,+cdp,${INSTALLROOT}/lib/: drops abs lib paths
+	 ldd.hp.pa: add
+03-06-06 package.sh: fix $INSTALLROOT/bin/ldd check
+	 make.probe: add CC.STDLIB verification
+03-06-04 make.probe: add +forceread +noforceread
+03-05-11 hurl.sh: handle http://host:port/path
+03-05-06 package.sh: fix setup action PACKAGEROOT and INIT logic
+03-05-05 package.mk: fix cygwin tarball names
+03-04-30 package.sh: move (cc|ld|ldd).$HOSTTYPE updates from Makefile
+03-04-27 make.probe: fix mvs CC.PREFIX.SHARED "lib" => ""
+	 make.probe: add CC.DLL.DIR = $(BINDIR) or $(LIBDIR)
+	 make.probe: add { CC.LD.LAZY CC.LD.NOLAZY CC.LD.RECORD CC.LD.NORECORD }
+	 probe.win32: sync with latest CC.*
+03-04-25 mamprobe.sh: add args to `. $makeprobe' for ancient sh
+03-04-23 package.mk: fix dup "covered by" licenses
+03-04-22 probe.win32: CC.DIALECT += "LIBPP -I-" for all cc's
+	 package.sh: fix admin write binary tarball snarf
+03-04-21 package.mk: package covered *.@(pkg|lic) too
+03-04-15 package.mk: don't generate incremental archives for lcl
+	 package.mk: add incremental=[source:1 binary:0] archive control
+	 package.sh: generate $INSTALLROOT/bin/cc wrapper for CC != cc
+	 package.sh: admin must ditto lib/package/*.@(pkg|lic) too
+	 mamake.c: ignore time of ignore prereqs
+	 mamake.c: -D2 lists propagated times
+03-04-11 package.mk: tidy up cyg tarballs
+	 package.sh: fix old shell clash between get() and $get
+03-04-05 package.mk: restore *.inx generation somehow lost during cyg additions
+	 package.sh: add pthread_num_processors_np() last resort for cpu count
+	 package.sh: use `make believe' to accept mamake generated files
+	 package.sh: handle `make [make-flags] [target ...]'
+	 mamake.c: ignore -e
+03-03-21 package.mk: fix cyg old make typo
+	 package.sh: switch to `package setup' instructions
+03-03-19 package.sh: add registry checks for `host cpu'
+	 package.sh: `results failed' now lists core dump messages
+03-03-17 package.sh: on cygwin verify 'ntsec binmode' in $CYGWIN or die
+	 Makefile: install gcc wrapper if no cc
+	 package.mk: add :DETAILS: { :README: :EXPORT: :INSTALL: :TEST: } ops
+03-03-12 package.mk: add :DETAILS: for style-specific details
+03-03-11 package.sh: add beta setup/update support
+	 TEST.mk: add (TESTCC) prereq for .sh tests
+03-03-07 hurl.sh: add
+03-03-06 iffe.sh: fix lib win32 test cygwin vs native incompatibility
+	 iffe.sh: change internal stdio.h guard to handle C++ inline vs. macro
+03-03-03 package.sh: check for curl or wget for update
+	 package.sh: add setup action == update read make
+	 package.sh: fix packageroot() typo that showed up in non ~user shells
+	 mamake.c: treat name+=value args like name=value
+	 mamake.c: add ${var?*|value?match?no-match?}
+	 mamake.c: fix archive vs. dynamic bind logic
+03-02-28 package.sh: add the "cyg" (cygwin) package type
+	 package.mk: add "cyg" stubs, :CATEGORY: for category name(s)
+03-02-25 mamake.c: add -D4 system(3) debug trace
+03-02-24 package.mk: change --mismatch to --corrupt=accept
+03-02-14 ratz.c: add _WIN32 setmode([01],O_BINARY) and fopen "rb"/"wb"
+03-02-12 Makefile: handle getconf LIBPATH with host pattern
+03-01-31 package.mk: fix .lic search
+03-01-30 package.sh: handle { INIT ksh nmake } already installed elsewhere
+	 package.sh: admin handles command outside of $PACKAGEROOT/bin
+	 Makefile: install $(INSTALLROOT)/lib/make/package.mk
+03-01-28 package.sh: admin remote commands on one line to please syslog
+03-01-23 probe.win32: borland and mingw32 tweaks
+03-01-22 package.sh: fix $CC test to ignore set -x trace -- duh
+03-01-16 ditto.sh: tw --chop on by default
+03-01-14 package.sh: use /bin/cp to copy previous binaries to bin/ok/
+	 package.sh: admin now initiates remote exec and copy from local host
+03-01-12 package.sh: handle admin "xxx:" default root
+03-01-03 probe.win32: add /usr/include/borland path truncation workaround
+02-12-10 iffe.sh: add <&$nullin >&$nullout to checkread() $cc
+02-12-06 probe.win32: fix inlcude => include typo, add lcc lib
+	 probe.win32: CC.MAKE.OPTIONS = nativepp=0
+02-12-04 mamake.c: fix ${foo-bar} to expand foo if defined
+02-11-28 probe.win32: add C++ and -I- CC.DIALECT checks
+02-11-26 package.sh: package release now checks for second level files
+02-11-22 package.sh: update action now uses HTTP/1.0
+02-11-21 probe.win32: update the vc include dir test
+02-11-20 make.probe: fix CC.LD.ORIGIN typo that expanded make var
+02-11-13 packahe.mk: fix list.install => list.installed typo
+02-11-12 make.probe: add CC.LD.ORIGIN for a.out origin dir relative dll search
+	 make.probe: add CC.LD.STRIP for link time a.out strip
+	 package.sh: fix package_use vs. PACKAGE_USE check
+02-10-24 WWW.mk: fix bug that required a :WWWBIN: assertion to post
+02-10-23 mamake.c: fix unuinitialized time in make()
+	 ratz.c: fix meter buffer overflow
+02-10-20 package.sh: fix lib/probe/C/make/probe update test
+02-10-18 probe.win32: update for mingw
+	 make.probe: add bash workaround to SHELLMAGIC test
+	 package.sh: work around yet another cygwin hassle
+02-10-17 iffe.sh: short circuit id check for *[-+/\\]*
+02-10-08 regress.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: unset FIGNORE to avoid rm . errors
+	 package.sh: $CC must at least compile and executable hello world
+02-10-04 package.sh: $INSTALLROOT/lib/package/tgz=>$PACKAGEROOT/lib/package/tgz
+	 package.mk: $(ED) => $(STDED), $(EDFLAGS) => $(STDEDFLAGS)
+	 iffe.sh: add identifier checks for tests that (implicitly) require them
+	 iffe.sh: disambiguate a few --config macros
+02-10-02 iffe.sh: fix shell=bsh `hdr a/b'
+02-09-30 package.sh: handle chmod of -* files
+	 package.sh: verify that $SHELL is Bourne compatible
+	 package.sh: tighten PACKAGE_USE logic PATH,LIBPATH,etc. validation
+	 iffe.sh: fix bug that didn't define mac variable on success
+02-09-22 package.sh: handle admin_action=ditto
+	 iffe.sh: --config sizeof(foo) macro is SIZEOF_foo
+	 iffe.sh: fix long.long test so it doesn't defeat uwin "typ long.long"
+	 mamprobe.sh: convert $("foo") nmake string constants
+02-09-21 mamprobe.sh: "-" info-path writes probe info to stdout
+02-09-11 make.probe: move from nmake src to be part of mamprobe.sh
+	 mamprobe: generate from mamprobe.beg C.probe make.probe mamprobe.end
+	 mamake.c: pass cc absolute path to mamprobe
+	 package.sh: generate mamprobe -- yuk (at least it's confined to INIT)
+	 iffe.sh: lcl,nxt: drop default sys/ check
+	 ditto.sh: tw --logical by default; add --physical
+02-09-10 package.sh: SHELLMAGIC creeps into package too -- duh and fooey
+02-09-09 ditto.sh: test that remote .profile exists before sourcing
+02-09-06 package.sh: don't ditto nfs junk
+	 ditto.sh: --show now lists directory ops instead of enumerating all
+02-09-05 ditto.sh: add --remote={rsh|ssh}
+	 package.sh: add admin [[{rsh|ssh|-}]:]directory
+02-09-02 iffe.sh: change 'print -r --' to 'print -r -' for ksh86 compatibility
+02-09-01 cc.unix.mc68k: add for ancient 3b1
+02-08-22 package.sh: fix component() to test for components -- duh
+	 Makefile: add LICENSE:.DONTCARE to workaround mam
+02-08-11 iffe.sh: provide defaults for LD_* additions
+02-08-07 ratz.c: change -m to use * instead of non-portable inverse video
+02-07-17 mamprobe.sh: close tmp file in trap before rm for cygwin
+	 package.sh: fix "type" to handle i1586 (P4)
+	 package.sh: add the view action
+02-06-28 package.sh: handle multiple packages for release action
+02-06-27 package.sh: catch sol*.sparc=>sol*.sun4 when CC=gcc
+02-06-14 package.sh: fix admin_action to not include qualifiers
+	 package.sh: fix help/html doc typo
+02-06-11 package.sh: fix ditto update doc to `PACKAGEROOT field matching *:*'
+02-06-07 WWW.mk: change substitute $("\n") to \n
+02-06-06 package.sh: clarify output streams for help/html
+02-05-22 mamake.c: fix executable file check to use (S_IXUSR|S_IXGRP|S_IXOTH)
+02-04-04 package.sh: fix update to differentiate *.sun4 and sun4
+02-03-27 package.sh: yacc/bison warning only if both missing
+02-03-24 mamake.c: all shell actions wrapped with -c to avoid #! problems
+02-03-23 package.sh: recover $PACKAGEROOT/bin/package if not in INIT package
+	 package.sh: precheck $CC, not `cc'
+	 package.sh: fix install to use pax -ps to preserve set-uid/gid
+	 package.sh: fix install to use list.installed for existing files only
+02-03-17 package.sh: fix PAX initialization that was sometimes omitted for read
+	 package.sh: fix update delta sync fetch
+02-02-14 iffe.sh: fix macro{ }end docs to include "
+	 iffe.sh: add dfn to extract #define from headers
+	 iffe.sh: handle nxt #include ok but no line sync
+	 iffe.sh: drop local header clash logic
+	 iffe.sh: add -X, --exclude=dir to exclude -I dirs
+	 iffe.sh: lcl,nxt now generate <...> headers instead of "..."
+	 package.sh: admin.db root dir matching -* disables host
+	 package.mk: fix package.src.pat typo -- too many )
+	 package.mk: add { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 package.sh: handle { :COVERS: :DESCRIPTION: :REQUIRES: }
+	 Makefile: move proto.c generation to the proto component dir
+02-02-02 execrate.sh: add for .exe challenged win32 systems/commands
+	 mamprobe.sh: add STD* commands/flags
+	 mamake.c: update mamprobe info when older than mamprobe executable
+	 package.sh: move ed/ex workaround to mamprobe.sh
+	 package.sh: fix `host type' bug that incorrectly assumed sun4 for sol
+	 package.sh: add execrate(1) hooks for challenged systems
+	 package.sh: add check for { cc ar nm yacc/bison } before make
+	 ratz.c: fix "rb" vs. "r" macro tests
+	 iffe.sh: add nxt, similar to lcl but defines _nxt_foo for #include
+	 iffe.sh,package.sh: remove vaibale from sccs,cvs ident strings -- duh
+02-01-24 C+probe: check CC.DYNAMIC to handle cc that accept but ignore -B*
+	 iffe.sh: handle 'mem struct.a.b'
+02-01-22 iffe.sh: cache (internal) `foo vs. struct foo' test results
+	 package.sh: uts.370 => uts.390
+02-01-18 package.sh: fix uts hosttype
+02-01-17 package.sh: add 'results failed ...' to list failures only
+	 package.sh: change ARCH internal var to all_types to avoid env conflict
+	 iffe.sh: fix hdr/lib precheck that missed some -- ouch
+	 iffe.sh: fix noexecute test that forgot to check compile first!
+02-01-15 ratz.c: fix path[] type typo
+02-01-01 package.mk: tighten license search
+02-01-08 package.sh: `pwd` => ${PWD:-`pwd`}
+	 package.mk: expand license file pattern match
+02-01-04 iffe.sh: fix `exp name "value"' bug that duped "value"
+	 iffe.sh: fix initial <sys/types.h> check to honor --config
+01-12-25 iffe.sh: fix bug where -o file restored old file
+01-12-23 package.mk: uniq the closure lists
+01-12-07 ratz.c: fix --meter to retain paths containing " -- "
+01-11-30 ratz.c: use sear_system() to execute; should work on all windows
+01-11-28 ratz.c: fix sear_rm_r() to check SetCurrentDirectory() status
+01-11-26 ditto.sh: drop n+=v for ksh compatibility
+01-11-21 ditto.sh: add rsync script replacement [hey, it works!]
+	 package.sh: add [ditto]:directory notation to admin.db
+01-10-31 package.sh: handle *.sum paths with embedded space
+	 package.sh: change executable() to onpath()
+	 package.sh: executable([!] foo) replaces test [!] -x foo (.exe hack)
+	 package.sh: add os2 fix to `host type'
+	 mamake.c: add .exe hack
+	 iffe.sh: fix intrinsic function lib test
+	 mamprobe.sh: update pic probe to match make.probe for linux.ia64
+01-10-30 package.sh: make action skeleton view now checks subdirs
+01-10-20 package.sh: don't recurse into leaf dirs matching $MAKESKIP
+	 package.mk: tarball package.notice replaces `license accepted' prompt
+	 package.sh: eliminate `license accepted' prompt
+	 package.sh: add update to download latest from a url
+	 package.sh: use builtin arithmetic when we know it's ksh
+	 iffe.sh: unkown -> unknown
+01-10-18 package.sh: convert to YYYY-MM-DD delta releases instead of NNNN
+	 package.mk: convert to YYYY-MM-DD delta releases instead of NNNN
+	 ratz.c: fix -m for paths containing \f\n\r\v
+01-10-16 ratz.c: _SEA_* => SEAR_*
+	 ratz.c: preserve stdin for sear_exec()
+	 ratz.c: add recursive sear_rm_r() to sear_exec() tmp dir cleanup
+01-10-10 mamprobe.sh: add mam_cc_SHELLMAGIC
+	 package.sh: add nfs wakeup call to admin to avoid stale file handles
+01-10-04 cc.darwin.ppc: -flat_namespace is not longer the default (huh)
+01-10-01 package make: prepend $INSTALLROOT/bin/ok to PATH
+	 package read: save cpy of bin/package when reading the INIT package
+	 mamprobe.sh: allow cc path with optional arguments
+01-09-24 Makefile,package.sh: add $INSTALLROOT/bin/.paths initialization
+01-09-19 package.mk: add recurse to list.package.*
+	 package.sh: bootstrap build nmake with _BLD_STATIC for _WIN32
+01-09-11 ratz.c: add _SEA_SKIP & _SEA_COMMAND for self extracting archives
+01-09-07 package.mk: fix output capture to not generate files names with spaces
+01-09-07 package.mk: fix delta release number search
+01-08-11 package.mk: handle single gz executable packages (e.g., for ksh)
+	 package.sh: fix package install to require nmake only if no *.sum
+	 iffe.sh: drop ancient menu and prompt actions; check ./hdr.h clash
+01-07-17 package: fix use cross compile test to generate files in /tmp
+01-06-27 ratz: handle hard and soft links if possible
+01-06-07 Makefile: fix :MAPLIB: for sco
+01-05-31 crossexec.sh: add
+	 iffe.sh: add -x crosstype to run crossexec
+	 iffe.sh: exp test now handles pass{}end fail{}end yes{}end no{}end
+	 package.sh: add package host canon external-host-type-name
+	 package.sh: fix `use USER' lookup for shells that support ~USER
+	 cc.*: add -dumpmachine to dump target HOSTTYPE
+01-05-18 iffe.sh: drop $HOME/tmp/t.sh debug trace -- oops
+01-05-01 mamake.c: scan() now handles :PACKAGE: foo:command
+01-04-26 *.sh: expand [a-z][A-Z][0-9] for non-contiguous character codes
+	 iffe.sh: fix run *.sh for shells that don't $* across . command
+	 cc.mvs.390: recode for /bin/sh
+01-04-25 package.mk: include non cc-g variants by default
+	 package.sh: *[._]* => *?[_.]* for mvs.390 /bin/sh
+01-04-24 TEST.mk: no tests for VARIANT=="DLL"
+01-04-22 package.mk,package.sh: tarball text members are ascii encoded
+01-04-18 package.mk: allow package name to be the same as one of its components
+         cc.mvs.390: handle .C .cpp .cxx
+         cc.mvs.390: compensate for -o that does not overwrite
+01-04-01 regress: fix SAME that just skipped it -- we should regress regress!
+	 iffe: fix bug that didn't emit _hdr_foo for internal hdr tests
+	 iffe: fix lcl bug for cc -E that doesn't emit line syncs
+	 ratz: add ascii=>ebcdic conversion for text archive members
+	 mamake: fix buffer overlap bug that clobbered the probe file path
+01-03-17 iffe: handle : separator as first arg
+01-03-15 mamake.c,ratz.c,release.c: add <stdlib.h> and <string.h>
+01-02-26 iffe.sh: fix bug that omitted runtime #define for `mac' op
+01-02-22 cc.ibm.risc: handle SF_CLOSE clash in <sfio.h>
+01-02-14 cc.sgi.mips3,cc.sgi.mips4: handle -mips2 -mips3 -mips4 for cross cc
+	 C+probe: quote "$cc" when it's an argument!
+	 mamake: execute actions with $SHELL, ignored signals back to default
+	 package.sh: nmake check error output to /dev/null
+	 package.sh: fix INIT a.out updates for knr cc
+	 package.sh: package list now handles large tgz dirs
+	 package.sh: *-ok executables moved to ok/* for *.dll systems
+	 iffe.sh: change "exec >&-" to "exec >/dev/null" else linux mkdir fails!
+	 mamake: handle `bind -lx [dontcare]'
+01-02-12 ratz.c: fix _PACKAGE_ast includes
+	 package.sh: $HOSTTYPE env overrides if $PACKAGEROOT/arch/$HOSTTYPE/
+	 package.sh: $CC ^HOSTTYPE=[A-Za-z_0-9.]*$ overrides HOSTTYPE
+	 iffe.sh: fix dat code that used previous $tmp.exe
+	 iffe.sh: fix dat code for _DLL imports
+01-02-09 iffe.sh: add copy() for shells with the disappearing here doc bug
+01-02-08 Makefile: guard against null $(CC.HOSTTYPE)
+01-02-06 Makefile: separate out cc,ld,ldd workarounds (so they will be packaged)
+01-02-02 package.sh: fix package use for $INSTALLROOT != */$HOSTTYPE
+	 package.sh: create intermediate recursion makefiles when needed
+	 package.sh: add $SECONDS to the DEBUG trace prompt
+01-01-01 ratz.c: #ifdef for uwin ncc
+	 iffe.sh,package.sh: check PACKAGE_PATH for local installations
+	 package.sh: add psrinfo for osf.alpha host cpu
+	 package.sh: change pax --meter probe; some hang on /dev/tty
+	 package.sh: fix `install flat ARCH'
+	 mamake: eliminate loops from scan order
+	 C+probe: add probe_verbose -V for aix cc=xlc
+	 cc.ibm.risc,ldd.ibm.risc: add
+	 package.mk: list refs to top-level licenses only
+	 package.mk: add local link table to change log html
+00-12-25 package.sh: `no package archives' is a hard error, duh
+	 package.sh: reorder host type logic for lame shells
+	 mamake.c: getcwd => getwd for NeXT -- how about posix==default guys
+	 iffe.sh: really gross workaround for NeXT -lposix stdout null's
+	 iffe.sh: handle cc -E that insists on compiling
+00-12-15 iffe.sh: ancient sh function call blows $*; call only when $# == 0
+	 *.sh: `getopts 2>/dev/null` => `(getopts)2>/dev/null` for ancient sh
+	 package.sh: fix LD_LIBRARY*_PATH initialization
+	 cc.next.m68k: add for _POSIX_SOURCE and linker multiply defined syms
+00-12-12 ratz: add --meter
+	 package.sh: a few VPATH fixes
+	 Makefile: don't override *.mips* cc if -version not accepted
+00-12-11 package.mk: *.inx now contains name=value
+00-12-07 package.sh: handle PC netscape . => _ pathname mangle
+	 WWW.mk: .tar.gz => .tgz
+00-11-27 package.sh: add checklicense() to do license checks at read time
+	 package.mk: change component list from preformat to table
+00-10-31 package.mk: *.pkg must assert closure
+	 package.mk: add cc- variants to list.package.binary
+	 package.sh: omit dups from package list
+	 package.sh: invalid arg gives one line Usage
+	 package.sh: relax checkaout checks for non-owners
+	 package.sh: package use sets NPROC if not already set or [01]
+	 proto.c: add $(INSTALLROOT)/include/ast hack
+00-10-26 WWW.mk: add .SOURCE rhs to :WWWPAGE:
+00-10-25 package: fix install
+	 package.mk: add list.install
+00-10-22 regress: fix VIEW to skip empty dirs
+00-10-19 package.mk: $(PACKAGEROOT)/bin/nmake => $(PACKAGEROOT)/bin/manmake
+	 iffe: validate #define identifiers
+00-10-18 C+probe: mac os10 additions
+	 package: add DYLD_LIBRARY_PATH initialization
+	 add ldd.$(CC.HOSTTYPE)
+00-10-01 iffe: handle -I* -L* options
+00-09-21 mamake: add libxxx and xxx to makefile ordered prereqs
+00-09-19 C+probe: add probe_longlong
+00-09-11 package: drop manmake and $PACKAGEROOT/bin/nmake
+00-09-08 iffe: verify that $cc is a C compiler
+00-06-14 mamprobe: fix win32.* probe
+	 mamake: fix bug that used lower view path for generation
+	 package: don't clobber $PACKAGEROOT/bin/nmake
+00-06-01 C+probe: fix stdinclude *again*
+	 package: fix write delta source to use default pax format
+	 package: add disambiguating bias for sgi.mips3 over sgi.mips4
+	 package.mk: fix for directory content packages lib ast-locale
+00-05-01 iffe: fix invalid _LIB_ macro identifier
+00-04-11 C+probe: uniq stdinclude and stdlib, fix usrinclude
+00-04-01 regress: fix explicit OUTPUT bug that didn't compare with expected
+00-03-17 package: all archives are .tgz for binary download
+	 package: $(PACKAGEROOT)/LICENSES/* in source and binary archives
+	 package: implement install and verify actions
+	 iffe: add exp, pth file dir ..., fix lib - -lfoo, fix lib - - -la -lb
+	 iffe: -L* must affect LD_LIBRARY* hacks for .exe tests -- yuk
+	 package.mk: add *.pkg :INDEX:
+00-03-07 package: add admin action
+00-03-06 makefile: install optional make probe override script C+make+probe.lcl
+00-02-14 --- release 1.0 ---
+	 ratz: treat "foo/" as a dir, not a regular file
+	 package: clarify source and binary installation instructions
+	 package: fix so binary packages can install without cc
+	 package: "ratz" now a non-archive package (the only one) for bootstrap
+	 package: handle VPATH=a:b arg
+	 package.mk: "ratz" package adjustments
+	 Makefile: use :PACKAGE_INIT: to support binary INIT packages
+	 WWW.mk: add :WWWALL:
+	 C.probe: fix .so check that let .dll slip through
+	 iffe: fix config sh var assignment for HAVE_member_IN_struct
+	 iffe: fix config sh var assignment for symbol_DECLARED
+	 package: delay PATH export until dll hack exports complete
+	 package: don't forget binary package $(INSTALLROOT)/lib(32|64)
+	 package: add delta change log for source packages
+00-02-10 mamprobe: add mam_cc_DLLBIG
+	 package: fix spelling typos
+	 package: add html help output
+	 package.mk: beef up source and binary help => html
+00-02-08 package: mkdir man/man[138] in the new arch to cover MAM bug
+00-01-28 package,release: add -rcount to release
+	 package: fix linux "host cpu" and "host rating"
+	 package: copy *.lic to $PACKAGEBIN for "make" and "write binary"
+	 package: fix 'release change log' case match
+00-01-24 package: add copyright action
+	 mamprobe: add -D_BLD_DLL to mam_cc_DLL
+00-01-11 package: tsort for package write
+	 package: early verification that $CC works
+	 package: add non-interactive command arg for use action
+	 proto: fix -C intermediate mkdir()
+	 mamprobe: unixware.i386 ksh workaround
+	 C.probe: move hosttype to C.probe (with unixware.i386 workaround)
+	 WWW.mk: fix mm2html option quoting
+	 WWW.mk: add .SCAN.mm
+	 WWW.mk: don't force static=1; grab dll's instead
+	 *.sh: fix getopts test to handle botched implementations like osf.alpha
+	 iffe.sh: fix read -r test
+99-12-25 iffe: tweak verbose messages
+	 iffe: hand code non-optget getopts parse
+	 iffe: fix bash quoting bug again
+	 iffe: do test -w . after option parse
+	 package: fix PACKAGEROOT search
+99-11-19 --- release 0.2 ---
+99-11-19 first working package & friends
+99-10-31 change from lib0ast to INIT; add MAM and package bootstrap
+	 hostinfo: gobbled by package
+99-10-01 iffe: add --config, yes{...}end no{...}end, fix read -r workaround
+99-09-27 iffe: add --all --verbose, --* set options
+99-09-22 regress: -v disables long line truncation
+99-09-11 WWW.mk: WWWDIR and MM2HTMLINFO are now lists searched in $(HOME)
+99-08-11 hostinfo: fix type sgi.mips4
+99-06-24 WWW.mk: add
+99-06-08 hostinfo.sh: ${TMPDIR:-/tmp}
+99-06-07 TEST.mk: add
+99-06-01 iffe: add `siz type' for _siz_type == sizeof(type)
+99-05-11 hostinfo,iffe,regress,use: long options
+99-05-01 C.probe: fix over aggressive stdinclude, e.g., /usr/include/machine
+99-04-01 hostinfo: sgi.mips? -o32 and -n32 checks
+	 iffe: check that . is writable
+99-03-17 hostinfo: fix for cc not found
+	 dl.c,hello.c,m.c: headers in conditionals to force .DONTCARE
+	 C.probe: extra check for include dirs pulled in by <sys/types.h>
+99-03-03 regress: add `UNIT - ...' for extra args
+	 Makefile: add (_hosttype_) prereq for cc
+99-01-23 hostinfo: tweak rating, use /proc/cpuinfo if there
+99-01-11 C.probe: shlib before lib, /usr before /
+98-12-25 iffe: work around win32.alpha intrinsic clash with -O
+98-11-11 regress: fix UNIT PATH lookup
+98-11-01 regress: add PROG
+98-10-01 hostinfo: add unixware.*
+	 use: export PACKAGE_*
+98-08-11 C.probe: add /usr/include check (for sco CC)
+	 hostinfo: handle uwin uname update
+98-05-01 regress: fix bug sometimes didn't list last test
+98-04-01 hostinfo: add cc path arg
+	 hostinfo: now works with /bin/sh
+	 Makefile: strengthed -lm probe
+98-01-23 Makefile: check for -ldl -lm
+	 C.probe: handle gcc -v -E phony include dirs
+	 iffe: fix lcl by dropping sort -u -- we need the real first
+	 iffe: `mem x' to test if x is a non-opaque struct
+98-01-11 $(INSTALLROOT)/lib32 for sgi.mips3
+	 $(INSTALLROOT)/lib64 for sgi.mips4
+	 add cc.hp.pa
+98-01-01 cc.sgi.mips*: turn off ld library multiply defined
+97-10-11 regress: add VIEW function for locating data
+97-10-01 Makefile: -ldl test moved to libdll Makefile
+97-08-11 regress: add MOVE
+	 regress: add SAME
+	 regress: use getopts
+	 regress: `EXEC' repeats previous test
+97-07-17 use: tweak PATH and LIBPATH bootstrap order
+	 iffe: fix lcl bug that botched pathnames with embedded spaces
+97-06-12 iffe: add npt `needs prototype' test
+97-05-09 hostinfo: mvs.* => mvs.390
+	 Makefile: cc.$(_hosttype_) workaround installed here
+	 iffe: fix nolink{ ... }end
+	 iffe: add [no]static{ ... }end for static link test
+	 C.probe: _probe_PATH => _probe_export which must be eval'd
+97-04-01 use: _RLD_ROOT set too
+97-03-17 mm2html: changed inner loop
+	 mm2html: handle .if|.ie|.el, .so
+	 mm2html: handle different man styles
+	 mm2html: differentiate mm/man in some non-obvious cases
+	 hostinfo: r5000 is not mips4
+97-02-14 hostinfo: validate type with cc
+96-12-25 C.probe: uwin tweaks
+	 iffe: use `...` instead of $(...) for alpha /bin/sh
+	 iffe: fix `typ' divide by 0
+	 iffe: `lcl' now drops X: prefix
+	 iffe: +l* -> -l*
+	 iffe: eval around ${...#%...} for bsd /bin/sh
+	 use: add sgi.mips LD_LIBRARY<abi>_PATH variants
+	 use: add -e to list exports
+	 iffe: lcl leaves leading [a-zA-Z]: for dos
+	 iffe: fix no{link|output|execute} logic
+	 C.probe: don't automatically add /usr/include for non-hosted compilers
+	 C.probe: don't automatically place /usr/include last
+	 C.probe: check gcc style -v -E for stdinclude usrinclude
+96-11-28 iffe: check BASH_VERSION for IFS botch
+	 iffe: typ long.xxx only if sizeof(long xxx) != sizeof(xxx)
+	 hostinfo: fix sgi.mips[234] tests
+	 hostinfo: fix ncr.i386 tests
+96-10-31 iffe: work around old bsh here doc bug by running separate sh
+96-10-11 iffe: *.iffe and *.iff for iffe src files
+	 hostinfo: tighten sgi.mips cpu type check
+96-10-01 C.probe: add probe_libdir to catch alpha /usr/shlib
+96-09-17 iffe: fix typ bug that failed for single id types!
+96-08-31 hostinfo: handle recent sgi hinv cpu changes
+96-07-17 make sure sizeof(long xxx)>sizeof(xxx) for typ long.xxx
+96-05-09 C.probe: drop multiple / in stdinclude
+96-02-29 use: package root must have bin and lib subdir
+	 mm2html: add
+	 C.probe: probe_members += -whole-archive for gcc
+	 iffe: add + fix the blasted `...'...\\...'...`
+96-01-31 use: add pkg dir
+	 hostinfo: add tandem
+96-01-01 hostinfo: windows_nt|windows[0-9][0-9] -> win32
+95-11-24 hostinfo: linux-aout.* for non-elf linux
+95-11-11 use: add aix LIBPATH
+95-10-11 hostinfo: no args prints type
+95-08-11 use: add
+95-05-09 save original PATH in _probe_PATH
+	 beef up library dir probe
+95-04-01 use c source suffix if it still preserves the dialect
+	 add hostinfo
+	 add lib/hostinfo/typemap user type map
+	 add sol.sun4 cpu count
+	 fix C.probe to properly handle C/C++ combined compiler drivers
+	 add NeXT to hostinfo
+	 bummer: mach has /usr/bin/hostinfo
+95-03-19 fix dialect executable test
+95-03-19 --- release 0.0 ---

+ 197 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/TEST.mk

@@ -0,0 +1,197 @@
+/*
+ * regression test support
+ *
+ * @(#)TEST.mk (AT&T Research) 2010-05-19
+ *
+ * test management is still in the design phase
+ */
+
+/*
+ * three forms for :TEST:
+ *
+ *	:TEST: xxx yyy ...
+ *
+ *		$(REGRESS) $(REGRESSFLAGS) xxx.tst
+ *		$(REGRESS) $(REGRESSFLAGS) yyy.tst
+ *
+ *	:TEST: xxx.tst yyy ...
+ *
+ *		$(REGRESS) $(REGRESSFLAGS) xxx.tst yyy ...
+ *
+ *	:TEST: xxx.c [ :: test-prereq ... :: ] [ args [ : args ... ] ]
+ *
+ *	:TEST: xxx.sh [ :: test-prereq ... :: ] [ args [ : args ... ] ]
+ *
+ *	xxx :TEST: prereq ...
+ *		[ action ]
+ *
+ *		$(*) if no action
+ */
+
+":TEST:" : .MAKE .OPERATOR
+	local B G P S T
+	test : .INSERT .TESTINIT
+	if "$("tests":T=FD)"
+		.SOURCE : tests
+	end
+	P := $(>:O=1)
+	if "$(P:N=*.tst)" && ! "$(@:V)"
+		B := $(P:B)
+		if ! ( T = "$(<:V)" )
+			T := $(B)
+		end
+		test : - test.$(T)
+		eval
+			test.$$(T) : $$(B).tst
+				$$(REGRESS) $$(REGRESSFLAGS) $$(*) $(>:V:O>1)
+			:SAVE: $$(B).tst
+		end
+	elif "$(P:N=*@(.sh|$(.SUFFIX.c:/ /|/G)|$(.SUFFIX.C:/ /|/G)))"
+		B := $(P:B)
+		if ! ( T = "$(<:V)" )
+			T := $(B)
+		end
+		:INSTALLDIR: $(B)
+		$(B) :: $(P) $(*:-l*|*$(CC.SUFFIX.ARCHIVE))
+		if "$(P:N=*.sh)"
+			TESTCC == $(CC)
+			$(B) : (TESTCC)
+		end
+		test : - test.$(T)
+		if "$(@:V)"
+			eval
+				test.$$(T) : $$(B) $(>:V:O>1)
+					set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+					$(@:V)
+			end
+		elif "$(>:V:O>1)"
+			local I A V X S R=0
+			for A $(>:V:O>1)
+				if A == "::"
+					let R = !R
+				elif A == ":"
+					let I = I + 1
+					test.$(T).$(I) := $(V:V)
+					V =
+					X := $(X:V)$(S)$$(*) $$(test.$(T).$(I):T=*)
+					S = $("\n")
+				elif A != "-l*|*$(CC.SUFFIX.ARCHIVE)"
+					if R
+						test.$(A) : .VIRTUAL .FORCE
+						test.$(T) : test.$(A)
+					else
+						V += $(A:V)
+					end
+				end
+			end
+			if V
+				let I = I + 1
+				test.$(T).$(I) := $(V:V)
+				X := $(X:V)$(S)$$(*) $$(test.$(T).$(I):T=*)
+			end
+			eval
+				test.$$(T) : $$(B)
+					set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+					$(X:V)
+			end
+		else
+			eval
+				test.$$(T) : $$(B)
+					set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+					$$(*)
+			end
+		end
+	elif ! "$(<:V)"
+		G = 1
+		for B $(>)
+			if B == "-|--"
+				let G = !G
+			else
+				if ! G
+					T =
+				elif ! ( T = "$(B:A=.COMMAND)" ) && ! "$(B:A=.TARGET)"
+					for S .c .sh
+						if "$(B:B:S=$(S):T=F)"
+							:INSTALLDIR: $(B)
+							$(B) :: $(B:B:S=$(S))
+							T := $(B)
+							break
+						end
+					end
+				end
+				test : - test.$(B)
+				test.$(B) : $(T) - $(B).tst
+					$(REGRESS) $(REGRESSFLAGS) $(*:N=*.tst) $(*:N!=*.tst)
+				:SAVE: $(B).tst
+			end
+		end
+	else
+		if "$(>:V)" || "$(@:V)"
+			P := $(>)
+			T := $(P:O=1)
+			B := $(T:B)
+			if "$(T)" != "$(B)" && "$(T:G=$(B))"
+				:INSTALLDIR: $(B)
+				$(B) :: $(T) $(P:O>1:N=-*)
+				T := $(B)
+				P := $(B) $(P:O>1:N!=-*)
+			end
+			if "$(<:V)"
+				T := $(<:V)
+			end
+			test : - test.$(T)
+			if "$(@:V)"
+				eval
+				test.$$(T) : $$(P) $(>:V:O>1)
+					set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+					$(@:V)
+				end
+			else
+				test.$(T) : $(P)
+					set +x; (ulimit -c 0) >/dev/null 2>&1 && ulimit -c 0; set -x
+					$(*)
+			end
+		else
+			test : - test.$(<)
+			test.$(<) : $(<).tst $(<:A=.COMMAND)
+				$(REGRESS) $(REGRESSFLAGS) $(*)
+		end
+	end
+
+.TESTINIT : .MAKE .VIRTUAL .FORCE .REPEAT
+	if VARIANT == "DLL"
+		error 1 :DLL: tests skipped
+		exit 0
+	end
+	set keepgoing
+	REGRESSFLAGS &= $(TESTS:@/ /|/G:/.*/--test=&/:@Q)
+
+.SCAN.tst : .SCAN
+	$(@.SCAN.sh)
+	I| INCLUDE@ % |
+
+.ATTRIBUTE.%.tst : .SCAN.tst
+
+MKTEST = mktest
+MKTESTFLAGS = --style=regress
+
+/*
+ * test scripts are only regenerated from *.rt when --force
+ * is specified or the .rt file is newer than the script
+ * otherwise the script is accepted if it exists
+ *
+ * this avoids the case where a fresh build with no state
+ * would regenerate the test script and capture current
+ * behavior instead of expected behavior
+ */
+
+%.tst : %.rt
+	if	[[ "$(-force)" || "$(>)" -nt "$(^|<)" ]]
+	then	$(MKTEST) $(MKTESTFLAGS) $(>) > $(<)
+	fi
+
+test%.sh test%.out : %.rt
+	if	[[ "$(-force)" || "$(>)" -nt "$(^|<:O=1)" ]]
+	then	$(MKTEST) --style=shell $(>) > $(<:N=*.sh)
+		$(SHELL) $(<:N=*.sh) --accept > $(<:N=*.out)
+	fi

+ 450 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/WWW.mk

@@ -0,0 +1,450 @@
+/*
+ * post stuff to WWWDIR for web access
+ * index generated from *.mm
+ */
+
+WWWDIR = wwwfiles public_html
+WWWSAVE =
+WWWSTYLE =
+WWWTYPES =
+
+.WWW.semaphore : .SEMAPHORE
+
+.EXPORT : WWWSTYLE WWWTYPES
+
+/*
+ * item :WWW: [style=frame] [save=pattern] file ...
+ *
+ *	`item'.mm generates index.html
+ *	other files copied to $(WWWDIR)/`item'
+ *	sets up www.bin
+ */
+
+":WWW:" : .MAKE .OPERATOR
+	local A B D I J L X E P R M
+	.WWW.LOCAL .WWW.REMOTE : .DO.NOTHING
+	WWWDIR := $(HOME:X=$(WWWDIR):T=F:O=1)
+	B := $(*:N=*.mm::O=1:B)
+	D := $(WWWDIR)/$(B)
+	M := $(WWWDIR)/man/man1
+	R := $(>:N!=*=*)
+	for I $(>:N=*=*)
+		A := WWW$(I:/=.*//:F=%(upper)s)
+		$(A) := $(I:/.*=//)
+	end
+	(html_info) : $$(MM2HTMLINFO) $$(MM2HTMLINIT)
+	if WWWSTYLE == "frame"
+		%.html %-index.html : %.mm (html_info)
+			$(MM2HTML) $(MM2HTMLFLAGS) $(%:N=faq.*:?> $(<:O=1)?-f $(%) -x?) -o WWWTYPES=$(WWWTYPES:@Q:@Q) $(WWWSOURCE.$(%)) $(>)
+	else
+		%.html : %.mm (html_info)
+			$(MM2HTML) $(MM2HTMLFLAGS) -o WWWTYPES=$(WWWTYPES:@Q:@Q) $(>) $(WWWSOURCE.$(%)) > $(<)
+	end
+	%.html : %.1 (html_info)
+		$(MM2HTML) $(MM2HTMLFLAGS) $(>) $(WWWSOURCE.$(%)) > $(<)
+	%-man.html : $(BINDIR)/% (html_info)
+		ignore $(>) --html 2> $(<)
+	.DO.WWW.MAN : .USE
+		if	{ test '' = '$(*)' || { strings $(*) | egrep -q '\[\+NAME\?|libcmd\.|cmd[0-9][0-9]\.' ;} ;} && [[ "$( $(<:B) '--???html' -- 2>&1 )" == version=[1-9]* ]]
+		then	( $(<:B) '--??html' -- 2>$(<) ) || true
+		fi
+	if 0
+		$(M)/%.html : .DONTCARE $(INSTALLROOT)/bin/%
+			$(@.DO.WWW.MAN)
+	end
+	if "$(<)"
+		D := $(<)
+	elif ! "$(R)"
+		return
+	end
+	.WWW .WWW.BIN : $(D) $(M) -
+	$(D) $(M) :
+		$(SILENT) test -d $(<) || mkdir $(<)
+	if ( J = "$(R:N=*.mm)" )
+		for I $(J:G=%.html)
+			if I == "*-index.html"
+				O := $(D)/index.html
+			else
+				O := $(I:D=$(D):B:S)
+			end
+			.WWW : $(O)
+			$(O) :COPY: $(I)
+		end
+	end
+	.WWW.req : .FUNCTION
+		return $(*$(%:T=SR):N=-l*:T=F:P=B:N!=-l*|/*)
+	A = 0
+	for I $(R:N!=*.mm)
+		if I == "-"
+			let A = ! A
+		elif I == "-l*"
+			L := $(I:/-l//)
+			if J = "$(.DLL.NAME. $(L) $($(L).VERSION):T=F)"
+				X += $(J)
+			end
+		elif A || "$(I:A=.COMMAND|.ARCHIVE)" || "$(I:D:D:N=$(INSTALLROOT))" || "$(I:N=*-www)"
+			X += $(I)
+			if "$(I:A=.COMMAND)"
+				X += $$(.WWW.req $(I))
+				J := $(I:/-www$//)
+				eval
+				.WWW : $(J:D=$(M):B:S=.html)
+				$(J:D=$(M):B:S=.html) : $(I) $(I:B:S=.1:T=F:?$(I:B:S=.1)??)
+					if	strings $$(*:O=1) | egrep -q '\[\+NAME\?|libcmd\.|cmd[0-9][0-9]\.'
+					then	$$(IGNORE) $$(*:O=1) '--??html' -- 2>&1
+					elif	test '' != '$$(*:N=*.1)'
+					then	$$(MM2HTML) $$(*:N=*.1)
+					fi > $$(<)
+				end
+			end
+		else
+			if I == "*.html"
+				$(I) : .TERMINAL
+			end
+			.WWW : $(D)/$(I)
+			$(D)/$(I) :COPY: $(I)
+		end
+	end
+	if "$(X:V)"
+		.WWW.EDIT. : .FUNCTION
+			local E I J
+			for I $(.INSTALL.LIST.:C,^$(INSTALLROOT)/,,:N!=lib/lib/*)
+				for J $(%)
+					if "$(I:B:S)" == "$(J:B:S)"
+						E += -s ',^$(J)$,$(I),'
+					end
+				end
+			end
+			return $(E)
+		.WWW.LIST. : .FUNCTION
+			local E I J
+			for I $(.INSTALL.LIST.:C,^$(INSTALLROOT)/,,:N!=lib/lib/*)
+				for J $(%)
+					if "$(I:B:S)" == "$(J:B:S)"
+						E += $(I)
+					end
+				end
+			end
+			return $(E)
+		.WWW .WWW.BIN : $(D)/$(B)-$(CC.HOSTTYPE).tgz
+		$(D)/$(B)-$(CC.HOSTTYPE).tgz : $(X:V)
+			cat > X.$(tmp).X <<!
+			This archive contains $(CC.HOSTTYPE) binaries for
+				$(.WWW.LIST. $(*))
+			Add the bin directory to PATH and the lib directory
+			to LD_LIBRARY_PATH or its equivalent for your system.
+			Use the --?help and --man options for online help,
+			documentation and contact info.
+			!
+			$(PAX) -wvf $(<) -x tar:gzip -s "/X.$(tmp).X/README/" $(.WWW.EDIT. $(*)) -s ',\(.*\)-www$,bin/\1,' -s ',.*/lib/,lib/,' X.$(tmp).X $(*:N!=-l*)
+			$(RM) -f X.$(tmp).X
+	end
+
+/*
+ * item ... :WWWBIN: index.mm file ... host:arch ...
+ *
+ *	home page control
+ *	`host' of type `arch' for www.bin files
+ */
+
+":WWWBIN:" : .MAKE .OPERATOR
+	local HOST ITEM ARCH BINS DIRS G
+	.WWW.NOMAN. += $(<)
+	for HOST $(>)
+		TYPE := $(HOST:/.*://)
+		HOST := $(HOST:/:.*//)
+		WWWTYPES += $(TYPE)
+		ARCH := $(PWD:D:C,/$(CC.HOSTTYPE)/,/$(TYPE)/)
+		BINS :=
+		DIRS :=
+		for ITEM $(<)
+			if TYPE == "$(CC.HOSTTYPE)"
+				G := $("index.mm":G=%.html:D=$(WWWDIR)/$(ITEM):B:S)
+				.WWW.LOCAL : $(G)
+				eval
+				$(G) : .JOINT $(ARCH)/$(ITEM)/$(ITEM).mm (html_info) .WWW.semaphore .FORCE
+					cd $$(*:D)
+					$$(MAKE) $$(-) $$(=) www
+				end
+			else
+				BINS += $(WWWDIR)/$(ITEM)/$(ITEM)-$(TYPE).tgz
+				DIRS += $(ARCH)/$(ITEM)
+			end
+		end
+		.WWW.REMOTE : $(BINS)
+		ARCH := $(ARCH:C,/src/.*,,)
+		eval
+		$(BINS) :JOINT: .FORCE .WWW.semaphore
+			rsh $(HOST) "
+				eval \"\`bin/package debug use\`\"
+				PATH=\$PATH:$(PATH):/usr/ccs/bin
+				umask 022
+				for dir in $(DIRS)
+				do	cd \$dir
+					$(MAKE) $(-) $(=) --errorid=\$dir www.bin
+				done
+				"
+		end
+	end
+
+/*
+ * :WWWPOST: [ host [ dir [ tmp ] ] ]
+ *
+ *	post local $(WWWDIR) to host:dir putting archives in host:tmp/www-*.pax
+ *	defaults: host=www dir=$(WWWDIR) tmp=tmp
+ */
+
+":WWWPOST:" : .MAKE .OPERATOR
+	local ( host dir tmp ignore ... ) $(>) www $(WWWDIR:B:S) tmp ignore
+	:ALL: delta.pax
+	.WWW.ALL : .WWW.REMOTE - .WWW.LOCAL
+	eval
+	.POST : .VIRTUAL base.pax delta.pax
+		case "$$(>)" in
+		'')	;;
+		*)	$$(>:C,.*,rcp & $(host):$(tmp)/$(dir)-&;,)
+			rsh $(host) '
+				umask 022
+				PATH=$HOME/bin:$PATH
+				cd $(dir)
+				pax -rvf $HOME/$(tmp)/$(dir)-delta.pax -z $HOME/$(tmp)/$(dir)-base.pax
+			'
+			;;
+		esac
+	end
+	base.pax :
+		cd $(WWWDIR)
+		pax -wvf $(<:P=A) .
+	.base.list. : .FUNCTION
+		local X
+		X := $(sh pax -f $(%:N=*.pax):C,\n, ,G:C,^,$$(WWWDIR)/,)
+		$(X) : .DONTCARE
+		return $(X)
+	delta.pax : .WWW.ALL base.pax $$(.base.list. $$(*))
+		cd $(WWWDIR)
+		pax -wvf $(<:P=A) -z $(*:N=*.pax:P=A) .
+
+.WWW.FAQ : .USE
+	{
+	set -o noglob
+	print .xx title=\"$(<:B:/\..*//) FAQ index\"
+	print .MT 4
+	print .TL
+	print
+	print .H 1 \"$(<:B:/\..*//) FAQ index\"
+	print .BL
+	for i in $(*)
+	do	exec < $i || exit 1
+		e=0 l=0 x=y
+		while	read -r op a1 a2
+		do	case $op in
+			.H)	case $e in
+				0)	e=1 ;;
+				1)	print .LE ;;
+				esac
+				print .sp
+				print .LI
+				a2=${a2//\"/}
+				a2=${a2%\ [Ff][Aa][Qq]}
+				f=${i%.*}.html
+				f=${f#*/}
+				print .xx link=\"$f'	'$a2\"
+				print .sp
+				print .NL
+				;;
+			.AL|.BL|.NL)
+				case $x in
+				y)	x=x ;;
+				*)	x=xx$x ;;
+				esac
+				;;
+			.LE)	x=${x%xx}
+				;;
+			.LI)	case $x in
+				x)	x=
+					print .LI
+					;;
+				esac
+				;;
+			.sp)	case $x in
+				'')	x=x ;;
+				esac
+				;;
+			*)	case $x in
+				'')	print -r -- $op $a1 $a2 ;;
+				esac
+				;;
+			esac
+		done
+		case $e in
+		1)	print .LE ;;
+		esac
+	done
+	print .LE
+	} > $(<)
+
+/*
+ * [ dir ] :WWWPAGE: [ source ... ] file.mm file
+ *
+ *	*.mm generates *.html
+ *	faq.*.mm generates faq.mm
+ *	other files copied to $(WWWDIR)[/dir]
+ *	files after - (toggle) are just asserted on ::
+ */
+
+":WWWPAGE:" : .MAKE .OPERATOR
+	local B D I J O P Q S X G A
+	A = 0
+	D := $(<:O=1)
+	P := $(>:N!=*=*)
+	S := $(>:N=*=*)
+	if X = "$(P:B:S:N=faq.*.mm)"
+		Q := $(D:+$(D).)faq.mm
+		$(Q) : .WWW.FAQ $(X)
+		P += $(Q)
+	end
+	if D
+		B := $(D:B)
+		if D != "/*"
+			D := $(WWWDIR)/$(D)
+			$(D) :INSTALLDIR:
+			.WWW.LOCAL : $(D)
+		end
+		for I $(<:B)
+			.WWW.LOCAL : $(WWWDIR)/man/man1/$(I).html
+			$(WWWDIR)/man/man1/$(I).html : .DONTCARE
+		end
+		for I $(P)
+			if I == "-"
+				let A = !A
+				continue
+			end
+			if A || I == "$(WWWSAVE)"
+				:: $(I)
+				continue
+			end
+			if "$(I:T=FD)"
+				.SOURCE : $(I)
+				if "$(<)"
+					WWWSOURCE.$(<:O=1) += $(I:T=F:P=L=*)
+				end
+				continue
+			end
+			if I == "*.html"
+				$(I) : .TERMINAL
+				O := $(I)
+				X := $(I)
+			elif ( G = "$(I:G=%.html)" )
+				$(G) : .IMPLICIT $(S) $(I)
+				if $(G:O) > 1
+					for J $(G)
+						if J == "*-index.html"
+							if J == "faq.*.*"
+								continue
+							end
+							O := index.html
+						else
+							O := $(J)
+						end
+						.WWW.LOCAL : $(D)/$(O)
+						$(D)/$(O) :INSTALL: $(J)
+					end
+					continue
+				end
+				if X
+					X := $(I)
+				else
+					X := index
+				end
+				I := $(I:B:S=.html)
+				O := $(X:B:S=.html)
+			else
+				O := $(I)
+			end
+			$(D)/$(O) :INSTALL: $(I)
+			.WWW.LOCAL : $(D)/$(O)
+		end
+	else
+		for I $(P)
+			if I == "-"
+				let A = !A
+				continue
+			end
+			if A || I == "$(WWWSAVE)"
+				:: $(I)
+				continue
+			end
+			if "$(I:T=FD)"
+				.SOURCE : $(I)
+				continue
+			end
+			if I == "*.html"
+				$(I) : .TERMINAL
+				O := $(I)
+			elif ( O = "$(I:G=%.html)" )
+				$(O) : $(S) .IMPLICIT $(I)
+			end
+			for J $(O)
+				if J == "*-index.html"
+					X := index.html
+				else
+					X := $(J)
+				end
+				X := $(WWWDIR)/$(X)
+				.WWW.LOCAL : $(X)
+				$(X) :COPY: $(J)
+			end
+		end
+	end
+
+/*
+ * rhs done by default
+ */
+
+":WWWALL:" : .MAKE .OPERATOR
+	.WWW.ALL : $(>)
+
+":WWWMAN:" : .MAKE .OPERATOR
+	.INIT : .WWW.MAN
+	.WWW.MAN. := $(>)
+	.WWW.MAN : .MAKE .FORCE
+		local H I
+		for I $(.WWW.MAN.)
+			.WWW.LOCAL : $(WWWDIR)/man/man1/$(I:B).html
+			$(WWWDIR)/man/man1/$(I:B).html : .DO.WWW.MAN $(I)
+		end
+		for I $(sh builtin:B)
+			.WWW.LOCAL : $(WWWDIR)/man/man1/$(I).html
+			$(WWWDIR)/man/man1/$(I).html : .DO.WWW.MAN -
+		end
+		for I $("$(BINDIR)/*([!-.])":P=G:B)
+			if I != "*_*"
+				H := $(WWWDIR)/man/man1/$(I).html
+				if ! "$(*$(H))" && I != "$(.WWW.NOMAN.:/ /|/G)"
+					.WWW.LOCAL : $(H)
+				end
+			elif "$(PATH:/:/ /G:X=$(I:/.*_//):T=F:O=1)"
+				H := $(WWWDIR)/man/man1/$(I:/.*_//).html
+				.WWW.LOCAL : $(H)
+				$(H) : .DO.WWW.MAN $(BINDIR)/$(I)
+			end
+		end
+
+.WWW.SED. : .FUNCTION
+	local E T
+	E = s/^\(\.xx.link=.*\)%HOSTTYPE%\(.*\)%HOSTTYPE%\(.*\)/
+	for T $(%)
+		E := $(E:V)\$$("\n").LI\$$("\n")\1$(T)\2$(T)\3
+	end
+	return $(E:V)/
+
+/*
+ * mm scan support
+ */
+
+.SCAN.mm : .SCAN
+	O|S|
+	I|.sn %|A.DONTCARE|M$$(%)|
+	I|.so %|A.DONTCARE|M$$(%)|
+
+.ATTRIBUTE.%.mm : .SCAN.mm

+ 6 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/ar.freebsd12.amd64

@@ -0,0 +1,6 @@
+: linux.i386-64 ar wrapper
+
+case $1 in
+*x*) /usr/bin/ar "$@" ;;
+*)   /usr/bin/ar U"$@" ;;
+esac

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/ar.ibm.risc

@@ -0,0 +1,9 @@
+: stupid stupid stupid to require a non-standard option for ar to work : 2009-10-06 :
+
+op=$1
+shift
+case $op in
+-*)	;;
+*)	op=-$op ;;
+esac
+/usr/bin/ar -Xany "$op" "$@"

+ 6 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/ar.linux.i386-64

@@ -0,0 +1,6 @@
+: linux.i386-64 ar wrapper
+
+case $1 in
+*x*) /usr/bin/ar "$@" ;;
+*)   /usr/bin/ar U"$@" ;;
+esac

+ 52 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin

@@ -0,0 +1,52 @@
+: unix wrapper for macOS cc : 2020-07-17 :
+
+HOSTTYPE=darwin.generic
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+CC=/usr/bin/cc
+op=init
+for arg
+do	case $op in
+	init)	op=ld
+		set ''
+		;;
+	esac
+	case $arg in
+	-c)	op=cc
+		;;
+	-E)	op=cpp
+		continue
+		;;
+	-G)	op=dll
+		continue
+		;;
+	-lc)	continue
+		;;
+	-lm)	continue
+		;;
+	esac
+	set "$@" "$arg"
+done
+case $# in
+0)	;;
+*)	shift ;;
+esac
+case $* in
+-v)	$CC "$@"; exit ;;
+esac
+case $op in
+init)	echo "cc: arguments expected" >&2
+	exit 1
+	;;
+cpp)	$CC -E "$@"
+	;;
+cc)	$CC -D_ast_int8_t=int64_t -D_lib_memccpy "$@"
+	;;
+dll)	$CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@"
+	;;
+ld)	$CC -Wl,-search_paths_first "$@"
+	;;
+esac

+ 71 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin07

@@ -0,0 +1,71 @@
+: unix wrapper for Mac OS X 10.3-10.6 (Darwin 7-10) cc : 2020-07-17 :
+
+HOSTTYPE=darwin07.generic
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+CC=/usr/bin/cc
+op=init
+for arg
+do	case $op in
+	init)	op=ld
+		set ''
+		;;
+	esac
+	case $arg in
+	-c)	op=cc
+		;;
+	-E)	op=cpp
+		continue
+		;;
+	-G)	op=dll
+		continue
+		;;
+	-lc)	continue
+		;;
+	-lm)	continue
+		;;
+	esac
+	set "$@" "$arg"
+done
+case $# in
+0)	;;
+*)	shift ;;
+esac
+case $* in
+-v)	$CC "$@"; exit ;;
+esac
+case $op in
+init)	echo "cc: arguments expected" >&2
+	exit 1
+	;;
+cpp)	$CC -E "$@"
+	;;
+cc)	$CC -DCLK_TCK=100 "$@"
+	;;
+dll)	# what a compatibility mess -- surely they can get the apis to play nice
+	tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+	trap "rm -f $tmp" EXIT
+	case `MACOSX_DEPLOYMENT_TARGET=10.3 ld -undefined dynamic_lookup 2>&1` in
+	*undefined*dynamic_lookup*)
+		ld -m -flat_namespace -undefined suppress -dylib -dynamic \
+			-ldylib1.o "$@" -lcc_dynamic -framework System >$tmp 2>&1
+		status=$?
+		;;
+	*)	MACOSX_DEPLOYMENT_TARGET=10.3 $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" >$tmp 2>&1
+		status=$?
+		;;
+	esac
+	egrep -v ' (warning .*multiple definitions|definition) of ' $tmp >&2
+	exit $status
+	;;
+ld)	tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+	trap "rm -f $tmp" EXIT
+	$CC -Wl,-m -DCLK_TCK=100 "$@" >$tmp 2>&1
+	status=$?
+	egrep -v ' (warning .*multiple definitions of|definition of|as lazy binding|not from earlier dynamic) ' $tmp >&2
+	exit $status
+	;;
+esac

+ 71 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.darwin11

@@ -0,0 +1,71 @@
+: unix wrapper for Mac OS X 10.7 (Darwin 11) cc : 2020-07-17 :
+
+HOSTTYPE=darwin11.generic
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+CC=/usr/bin/cc
+op=init
+for arg
+do	case $op in
+	init)	op=ld
+		set ''
+		;;
+	esac
+	case $arg in
+	-c)	op=cc
+		;;
+	-E)	op=cpp
+		continue
+		;;
+	-G)	op=dll
+		continue
+		;;
+	-lc)	continue
+		;;
+	-lm)	continue
+		;;
+	esac
+	set "$@" "$arg"
+done
+case $# in
+0)	;;
+*)	shift ;;
+esac
+case $* in
+-v)	$CC "$@"; exit ;;
+esac
+case $op in
+init)	echo "cc: arguments expected" >&2
+	exit 1
+	;;
+cpp)	$CC -E "$@"
+	;;
+cc)	$CC -DCLK_TCK=100 "$@"
+	;;
+dll)	# what a compatibility mess -- surely they can get the apis to play nice
+	tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+	trap "rm -f $tmp" EXIT
+	case `MACOSX_DEPLOYMENT_TARGET=10.7 ld -undefined dynamic_lookup 2>&1` in
+	*undefined*dynamic_lookup*)
+		ld -m -flat_namespace -undefined suppress -dylib -dynamic \
+			-ldylib1.o "$@" -lcc_dynamic -framework System >$tmp 2>&1
+		status=$?
+		;;
+	*)	MACOSX_DEPLOYMENT_TARGET=10.7 $CC -Wl,-flat_namespace -dynamiclib -undefined dynamic_lookup "$@" >$tmp 2>&1
+		status=$?
+		;;
+	esac
+	egrep -v ' (warning .*multiple definitions|definition) of ' $tmp >&2
+	exit $status
+	;;
+ld)	tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+	trap "rm -f $tmp" EXIT
+	$CC -Wl,-m -DCLK_TCK=100 "$@" >$tmp 2>&1
+	status=$?
+	egrep -v ' (warning .*multiple definitions of|definition of|as lazy binding|not from earlier dynamic) ' $tmp >&2
+	exit $status
+	;;
+esac

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.freebsd

@@ -0,0 +1,9 @@
+: FreeBSD cc wrapper
+
+HOSTTYPE=freebsd.generic
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+exec /usr/bin/cc -P "$@"

+ 13 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.ia64

@@ -0,0 +1,13 @@
+: hp.ia64 cc wrapper for reasonable ansi C defaults : 2011-01-25 :
+
+[ /usr/bin/cc -ef /usr/ccs/bin/cc ] || exit 1
+
+: bundled cc -- really, in the face of gcc you ship a sub-par /usr/bin/cc? :
+
+HOSTTYPE=hp.ia64
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/usr/bin/cc -D_HPUX_SOURCE -D_INCLUDE__STDC_A1_SOURCE -D_INCLUDE_XOPEN_SOURCE_500 "$@"

+ 13 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa

@@ -0,0 +1,13 @@
+: hp.pa cc wrapper for reasonable ansi C defaults : 2004-02-29 :
+
+HOSTTYPE=hp.pa
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+_AST_CC_hp_pa_DEFAULT=${_AST_CC_hp_pa_DEFAULT-"+DAportable"}
+
+/opt/ansic/bin/cc -Ae +e -Wl,+s $_AST_CC_hp_pa_DEFAULT \
+	${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \
+	-Wl,+vnocompatwarnings "$@"

+ 11 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.hp.pa64

@@ -0,0 +1,11 @@
+: hp.pa64 cc wrapper for reasonable ansi C defaults : 2001-02-11 :
+
+HOSTTYPE=hp.pa64
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/opt/ansic/bin/cc +D2.0W -Ae +e -Wl,+s \
+	${INSTALLROOT:+-Wl,+cdp,${INSTALLROOT}/lib/:} \
+	-Wl,+vnocompatwarnings "$@"

+ 63 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc

@@ -0,0 +1,63 @@
+: cc wrapper for aix risc xlc : 2012-04-17 :
+
+hosttype=ibm.risc
+
+case $HOSTTYPE in
+$hosttype-64)
+	case " $* " in
+	*" -q64 "*)	;;
+	*)		set -- -q64 "$@" ;;
+	esac
+	;;
+*)	case " $* " in
+	*" -q64 "*)	HOSTTYPE=$hosttype-64 ;;
+	*)		HOSTTYPE=$hosttype ;;
+	esac
+	;;
+esac
+
+case " $* " in
+*" -dumpmachine "*)
+	echo $HOSTTYPE
+	exit
+	;;
+esac
+
+bin=/usr/vac/bin
+cc=$bin/xlc
+
+ccflags="-brtl -qhalt=e -qsuppress=1506-224:1506-507"
+case " $@ " in
+*" -G "*)      
+	ccflags="$ccflags -berok"
+	;;
+esac
+if	test -x $bin/c99
+then	# the xlc optimizer vintage that supports c99 is flawed and causes the ast build to fail #
+	case " $* " in
+	*" -O "*)
+		set '' "$@" ''
+		shift
+		while	:
+		do	a=$1
+			shift
+			case $a in
+			'')	break ;;
+			-O)	;;
+			*)	set '' "$@" $a ;;
+			esac
+			shift
+		done
+		;;
+	esac
+	$cc $ccflags "$@"
+	code=$?
+else	export PATH=/bin:$PATH LIBPATH=/usr/lib:/lib
+	ccflags="$ccflags -blibpath:$LIBPATH"
+fi
+$cc $ccflags "$@"
+code=$?
+case $code in
+127|255)	code=1 ;;
+esac
+exit $code

+ 36 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.ibm.risc.gcc

@@ -0,0 +1,36 @@
+: cc wrapper for aix risc gcc : 2012-04-17 :
+
+hosttype=ibm.risc
+
+case $HOSTTYPE in
+$hosttype-64)
+	case " $* " in
+	*" -maix64 "*)	;;
+	*)		set -- -maix64 "$@" ;;
+	esac
+	;;
+*)	case " $* " in
+	*" -maix64 "*)	HOSTTYPE=$hosttype-64 ;;
+	*)		HOSTTYPE=$hosttype ;;
+	esac
+	;;
+esac
+
+case " $* " in
+*" -dumpmachine "*)
+	echo $HOSTTYPE
+	exit
+	;;
+esac
+
+cc=gcc
+ccflags=
+
+case " $@ " in
+*" -shared "*)      
+	ccflags="$ccflags -shared -Wl,-G -Wl,-berok"
+	;;
+*)	ccflags="-Wl,-brtl"
+	;;
+esac
+$cc $ccflags "$@"

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.aarch64

@@ -0,0 +1,9 @@
+: linux.aarch64 cc wrapper : 2006-02-14 :
+
+HOSTTYPE=linux.aarch64
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/usr/bin/cc -P "$@"

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-64

@@ -0,0 +1,9 @@
+: linux.i386-64 cc wrapper : 2006-02-14 :
+
+HOSTTYPE=linux.i386-64
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/usr/bin/cc -P "$@"

+ 22 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-64-icc

@@ -0,0 +1,22 @@
+: linux.i386-64 icc wrapper : 2011-10-18 :
+
+HOSTTYPE=linux.i386-64-icc
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+icc=$(which icc 2>/dev/null)
+case $icc in
+"")	if	test -f /etc/profile.d/icc.sh
+	then	. /etc/profile.d/icc.sh
+	fi
+	icc=$(which icc 2>/dev/null)
+	case $icc in
+	"")	echo icc: not found >&2
+		exit 127
+		;;
+	esac
+	;;
+esac
+$icc "$@"

+ 22 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.i386-icc

@@ -0,0 +1,22 @@
+: linux.ia64 icc wrapper : 2011-10-18 :
+
+HOSTTYPE=linux.ia64-icc
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+icc=$(which icc 2>/dev/null)
+case $icc in
+"")	if	test -f /etc/profile.d/icc.sh
+	then	. /etc/profile.d/icc.sh
+	fi
+	icc=$(which icc 2>/dev/null)
+	case $icc in
+	"")	echo icc: not found >&2
+		exit 127
+		;;
+	esac
+	;;
+esac
+$icc "$@"

+ 22 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.linux.ia64-icc

@@ -0,0 +1,22 @@
+: linux.ia64 icc wrapper : 2011-10-18 :
+
+HOSTTYPE=linux.ia64-icc
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+icc=$(which icc 2>/dev/null)
+case $icc in
+"")	if	test -f /etc/profile.d/icc.sh
+	then	. /etc/profile.d/icc.sh
+	fi
+	icc=$(which icc 2>/dev/null)
+	case $icc in
+	"")	echo icc: not found >&2
+		exit 127
+		;;
+	esac
+	;;
+esac
+$icc "$@"

+ 81 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.i386

@@ -0,0 +1,81 @@
+: lynxos.i386 cc wrapper with -dynamic default : 2005-02-14 :
+
+HOSTTYPE=lynxos.i386
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+cc=gcc
+
+link=1
+static=0
+set . "$@" /../
+while	:
+do	shift
+	case $1 in
+	/../)	break ;;
+	esac
+	case $1 in
+	*.[cChHiI]|*.[cChHiI][pPxX][pPxX])
+		set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/x86 "$@"
+		shift
+		break
+		;;
+	-o)	case $2 in
+		/../)	;;
+		*)	x=$1
+			shift
+			set . "$@" "$x"
+			shift
+			;;
+		esac
+		;;
+	-static)static=1
+		;;
+	-l*)	case $static in
+		0)	static=n
+			set . -L/lib/shlib "$@"
+			shift
+			;;
+		esac
+		;;
+	-[cE])	link=0
+		;;
+	esac
+	x=$1
+	shift
+	set . "$@" "$x"
+done
+while	:
+do	case $1 in
+	/../)	shift
+		break
+		;;
+	-l*)	case $static in
+		0)	static=n
+			set . -L/lib/shlib "$@"
+			shift
+			;;
+		esac
+		;;
+	-[cE])	link=0
+		;;
+	esac
+	x=$1
+	shift
+	set . "$@" "$x"
+	shift
+done
+case $link:$static in
+1:0)	static=n ;;   
+esac
+case $static in
+n)	specs=/tmp/cc$$.specs
+	trap 'status=$?; rm -f $specs; exit $status' 0 1 2
+	echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs
+	$cc -specs=$specs "$@"
+	;;
+*)	$cc "$@"
+	;;
+esac

+ 85 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.lynxos.ppc

@@ -0,0 +1,85 @@
+: lynxos.ppc cc wrapper with -mshared default : 2005-06-01 :
+
+HOSTTYPE=lynxos.ppc
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+cc=gcc
+
+link=1
+static=0
+set . "$@" /../
+while	:
+do	shift
+	case $1 in
+	/../)	break ;;
+	esac
+	case $1 in
+	*.[cChHiI]|*.[cChHiI][pPxX][pPxX])
+		set . -D__NO_INCLUDE_WARN__ -I/sys/include/kernel -I/sys/include/family/ppc "$@"
+		shift
+		break
+		;;
+	-o)	case $2 in
+		/../)	;;
+		*)	x=$1
+			shift
+			set . "$@" "$x"
+			shift
+			;;
+		esac
+		;;
+	-static)static=1
+		;;
+	-mshared)
+		static=n
+		continue
+		;;
+	-l*)	case $static in
+		0)	static=n
+			set . -L/lib/shlib "$@"
+			shift
+			;;
+		esac
+		;;
+	-[cE])	link=0
+		;;
+	esac
+	x=$1
+	shift
+	set . "$@" "$x"
+done
+while	:
+do	case $1 in
+	/../)	shift
+		break
+		;;
+	-l*)	case $static in
+		0)	static=n
+			set . -L/lib/shlib "$@"
+			shift
+			;;
+		esac
+		;;
+	-[cE])	link=0
+		;;
+	esac
+	x=$1
+	shift
+	set . "$@" "$x"
+	shift
+done
+case $link:$static in
+1:0)	static=n ;;   
+esac
+case $static in
+n)	specs=/tmp/cc$$.specs
+	trap 'status=$?; rm -f $specs; exit $status' 0 1 2
+	echo '*link: %{shared:-shared} %{static:-static} %{mshared|shared: %{static: %eerror: -shared and -static may not be combined. }}' > $specs
+	$cc -specs=$specs -mshared "$@"
+	;;
+*)	$cc "$@"
+	;;
+esac

+ 279 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.mvs.390

@@ -0,0 +1,279 @@
+: mvs.390 cc wrapper for unix message and exit code semantics : 2012-01-20 :
+
+HOSTTYPE=mvs.390
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+ar=ar
+cc=/bin/c89
+CC=/bin/c++
+ccflags="-D_ALL_SOURCE -Wc,dll"
+objmax=60
+tmpfiles=
+unbotch=
+
+# -n as *first* arg shows but does not do
+# -Wc,exportall => -Wl,dll
+# -Bdynamic => .c,.o dynamic
+# -Bstatic => .c,.o static
+# *.C => cc=$CC
+# *.cpp => cc=$CC
+# *.cxx => cc=$CC
+# no optimization until the optimizer is fixed:
+#	-O	dropped (no optimization)
+#	-0	dropped (no optimization)
+#	-1	-O (default level 1 optimization)
+#	-2	-2 (maximal level 2 optimization)
+
+let argc=0 cmp=0 dll=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 relc=0 botched=0
+case $1 in
+-n)	exec=print
+	shift
+	;;
+*)	exec=
+	;;
+esac
+export _CC_ACCEPTABLE_RC=1
+export _C89_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC
+export _CXX_ACCEPTABLE_RC=$_CC_ACCEPTABLE_RC
+case " $* " in
+*.C" "*)let dll=2
+	cc=$CC
+	export _CXXSUFFIX=C
+	;;
+*.cpp" "*)let dll=2
+	cc=$CC
+	export _CXXSUFFIX=cpp
+	;;
+*.cxx" "*)let dll=2
+	cc=$CC
+	export _CXXSUFFIX=cxx
+	;;
+esac
+exe=
+xxx=
+while	:
+do	case $# in
+	0)	break ;;
+	esac
+	arg=$1
+	case $arg in
+	-1)	arg=-O
+		;;
+	-Bdynamic)
+		let dynamic=1
+		;;
+	-Bstatic)
+		let dynamic=0
+		;;
+	-c)	let cmp=1
+		;;
+	-D_ALL_SOURCE|-D_ALL_SOURCE=*)
+		arg=
+		;;
+	-D*[\ \(\)]*)
+		arg=${arg#-D}
+		botch_macro[botched]=${arg%%=*}
+		botch_value[botched]=${arg#*=}
+		let botched=botched+1
+		arg=
+		;;
+	-o)	argv[argc]=$arg
+		let argc=argc+1
+		shift
+		arg=$1
+		exe=$arg
+		rm -f "$exe"
+		;;
+	-[O0])	arg=
+		;;
+	-Wc,dll)arg=
+		;;
+	-Wc,exportall)
+		let dll=1
+		;;
+	-Wl,dll)arg=
+		let dll=1
+		;;
+	*.c)	if	[[ $botched != 0 ]]
+		then	src=$arg
+			arg=${arg##*/}
+			unbotch="$unbotch ${arg%.c}.o"
+			arg=__$arg
+			tmpfiles="$tmpfiles $arg"
+			{
+				while	[[ $botched != 0 ]]
+				do	let botched=botched-1
+					print -r -- "#define ${botch_macro[botched]} ${botch_value[botched]}"
+				done
+				cat $src
+			} > $arg
+		fi
+		;;
+	*.o)	if	test 0 != $dynamic
+		then	let dynamic_objc=dynamic_objc+1
+		else	let static_objc=static_objc+1
+		fi
+		;;
+	*.x)	a=${arg%.x}.a
+		if	test -f $a
+		then	argv[argc]=$a
+			let argc=argc+1
+			xxx=-Wl,dll
+			case $a in
+			ast.a|*/ast.a)
+				cc="$CC -u_ast_init"
+				;;
+			esac
+		fi
+		;;
+	esac
+	case $arg in
+	?*)	argv[argc]=$arg
+		let argc=argc+1
+		;;
+	esac
+	shift
+done
+
+tmp=/tmp/cc.${USER:-$LOGNAME}.$$.err
+tmpfiles="$tmp $tmpfiles"
+
+# if any dll .o's are in .a then a .x gets generated
+# but the native cc doesn't jcl for the .x
+# -Wl,dll does that, so we nuke the .x and keep the exe
+
+test 0 != $dll && xxx=
+case $xxx in
+?*)	case $exe in
+	?*)	a=${exe##*/}
+		a=${a%.*}
+		case $exe in
+		*/*)	tmpfiles="$tmpfiles ${exe%/*}/${a}.x" ;;
+		*)	tmpfiles="$tmpfiles ${a}.x" ;;
+		esac
+		;;
+	esac
+	;;
+esac
+if	test 0 != $dll
+then	if	test 0 != $cmp
+	then	xxx="-D_SHARE_EXT_VARS $xxx"
+	else	xxx="-Wl,dll $xxx"
+	fi
+fi
+set -- $xxx "${argv[@]}"
+
+# can't handle more than objmax .o's
+# -r into intermediates doesn't work, but the cat trick does
+# also, the runtime dll file must be executable but cc -Wl,dll forgets
+
+if	test 0 != $dll -a \( $dynamic_objc -ge $objmax -o 0 != $static_objc \)
+then	unset argv
+	argc=0 libc=0 dynamic=1 dynamic_objc=0 static_objc=0 endc=0
+	while	:
+	do	case $# in
+		0)	break ;;
+		esac
+		case $1 in
+		-Bdynamic)
+			let dynamic=1
+			;;
+		-Bstatic)
+			let dynamic=0
+			;;
+		*.o)	if	test 0 != $dynamic
+			then	dynamic_objv[dynamic_objc]=$1
+				let dynamic_objc=dynamic_objc+1
+			else	static_objv[static_objc]=$1
+				let static_objc=static_objc+1
+			fi
+			;;
+		-l*)	libv[libc]=$1
+			let libc=libc+1
+			;;
+		-o)	argv[argc]=$1
+			let argc=argc+1
+			shift
+			argv[argc]=$1
+			let argc=argc+1
+			exe=$1
+			;;
+		*)	argv[argc]=$1
+			let argc=argc+1
+			;;
+		esac
+		shift
+	done
+	if	test 0 != $static_objc
+	then	case $exe in
+		?*)	$exec $ar cr ${exe%.*}.a "${static_objv[@]}" ;;
+		esac
+	fi
+	if	test 0 != $dynamic_objc
+	then	cat=0.0.o
+		tmpfiles="$tmpfiles $cat"
+		cat "${dynamic_objv[@]}" > $cat || exit
+	else	cat=
+	fi
+	set -- "${argv[@]}" $cat "${libv[@]}"
+fi
+
+# grep through the warning/error messages to get the true exit code
+# some annoying messages are dropped while we're at it
+
+trap 'rm -f $tmpfiles' 0 1 2 15
+$exec $cc $ccflags "$@" 2> $tmp
+code=$?
+for i in $unbotch
+do	test -f __$i && mv __$i $i
+done
+typeset -l lc
+while	:
+do	if	read line
+	then	lc=$line
+		case $lc in
+		*'#include file'*'not found'*)
+			code=1
+			;;
+		*'#pragma ignored'*)
+			continue
+			;;
+		*'definition side file is not defined'*)
+			continue
+			;;
+		*'step ended with return code 4'*)
+			code=0
+			continue
+			;;
+		*'step ended with return code'*)
+			code=1
+			continue
+			;;
+		*'try again'*)
+			code=1
+			continue
+			;;
+		*'unknown preprocessing directive'*)
+			code=1
+			case $lc in
+			'warning '*)
+				set -- $line
+				shift
+				line=$*
+				;;
+			esac
+			;;
+		*'unresolved writable static references are detected'*)
+			test 0 != $dll && continue
+			;;
+		esac
+	else	case $code:$exe in
+		0:?*)	$exec chmod +x $exe ;;
+		esac
+		exit $code
+	fi
+	echo "$line" >&2
+done < $tmp

+ 158 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.i386

@@ -0,0 +1,158 @@
+: next.i386 cc wrapper for unix message and exit code semantics : 1995-05-09 :
+
+HOSTTYPE=next.i386
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+# 1995-05-09	-lposix termios.o waitpid.o setpgid.o *do* work
+# 1994-11-04	-posix has old redirection hole bug
+#		-D_POSIX_SOURCE requires <sys/dirent.h> manual fixes
+#		libexpr/exeval.c bombs -O, no -O ok
+
+command=cc
+cc="/bin/cc -D_POSIX_SOURCE"
+nooptimize="exeval"
+
+# first check $INSTALLROOT/botch
+
+case $INSTALLROOT in
+"")	echo "$command: INSTALLROOT: must be defined and exported" >&2; exit 1 ;;
+esac
+if	test ! -d $INSTALLROOT/botch -a -dryrun != "$1"
+then	if	mkdir $INSTALLROOT/botch
+	then	: ok to initialize
+	else	echo "$command: $INSTALLROOT/botch must be initialized by the owner of $INSTALLROOT" 2>&1
+		exit 1
+	fi
+	(
+		cd $INSTALLROOT/botch
+		dir=.
+		for i in lib . include sys
+		do	case $i in
+			.)	dir=.
+				;;
+			*)	case $i in
+				/*)	dir=$i ;;
+				*)	dir=$dir/$i ;;
+				esac
+				test -d $dir || mkdir $dir
+				;;
+			esac
+		done
+		if	test ! -f include/sys/dirent.h
+		then	echo "#include <dirent.h>" > tmp.c
+			header=`$cc -E tmp.c | sed -e '/^#[ 	]*1[ 	].*\/sys\/dirent\.h"/!d' -e 's/.*"\(.*\)".*/\1/'`
+			sed -e 's/[ 	]off_t[ 	][ 	]*d_off[ 	]*;//' $header > include/sys/dirent.h
+		fi
+		if	test ! -f lib/libbotch.a
+		then	lipo /usr/lib/libposix.a -thin i386 -output tmp.a
+			ar x tmp.a termios.o waitpid.o setpgid.o
+			ar cr lib/libbotch.a *.o
+			ranlib lib/libbotch.a
+		fi
+		rm -f *.[aco]
+	)
+fi
+
+# now slip in our args
+
+case $nooptimize in
+"")	nooptimize=.
+	;;
+*)	optimize=
+	for arg in $nooptimize
+	do	case $optimize in
+		?*)	optimize="$optimize|" ;;
+		esac
+		optimize="$optimize$arg.[ci]|*/$arg.[ci]"
+	done
+	nooptimize=$optimize
+	;;
+esac
+set . "$@" .
+noexec=
+library=
+local=
+optimize=
+verbose=
+while	:
+do	shift
+	arg=$1
+	shift
+	case $arg in
+	.)	break
+		;;
+	-[cES])	library=1
+		;;
+	-O)	optimize=1
+		;;
+	-v)	verbose=1
+		;;
+	-dryrun)noexec=1
+		verbose=1
+		;;
+	-I-)	case $local in
+		"")	local=1
+			set . "$@" -I$INSTALLROOT/botch/include -I- -I$INSTALLROOT/botch/include
+			;;
+		*)	set . "$@" -I- -I$INSTALLROOT/botch/include
+			;;
+		esac
+		continue
+		;;
+	-I*|*.[cChHiI]|*.[cChHiI][pPxX][pPxX])
+		case $optimize in
+		1)	eval	"
+				case \$arg in
+				$nooptimize)
+					optimize=0
+					;;
+				esac
+			"
+			;;
+		esac
+		case $local in
+		"")	local=1
+			set . "$@" -I$INSTALLROOT/botch/include "$arg"
+			continue
+			;;
+		esac
+		;;
+	-last|*/libast.a)
+		case $library in
+		"")	library=1
+			set . "$@" $INSTALLROOT/botch/lib/libbotch.a "$arg" $INSTALLROOT/botch/lib/libbotch.a
+			continue
+			;;
+		esac
+		;;
+	esac
+	set . "$@" "$arg"
+done
+case $library in
+"")	set . "$@" $INSTALLROOT/botch/lib/libbotch.a
+	shift
+	;;
+esac
+case $optimize in
+0)	set . "$@" .
+	while	:
+	do	shift
+		arg=$1
+		shift
+		case $arg in
+		.)	break ;;
+		-O)	set . "$@" ;;
+		*)	set . "$@" "$arg" ;;
+		esac
+	done
+	;;
+esac
+case $verbose in
+?*)	echo $cc "$@" ;;
+esac
+case $noexec in
+"")	$cc "$@" ;;
+esac

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.next.m68k

@@ -0,0 +1,9 @@
+: next.m68k cc wrapper that enables posix : 2000-12-15 :
+
+HOSTTYPE=next.m68k
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/bin/cc -posix -Xlinker -m "$@"

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.openbsd

@@ -0,0 +1,9 @@
+: OpenBSD cc wrapper
+
+HOSTTYPE=openbsd.generic
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+exec /usr/bin/cc -P "$@"

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.osf.alpha

@@ -0,0 +1,9 @@
+: osf.alpha cc wrapper with reasonable namespace defaults : 1998-02-04 :
+
+HOSTTYPE=osf.alpha
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/usr/bin/cc -std -Dnoshare=_noshare_ -Dreadonly=_readonly_ "$@"

+ 26 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.pentium4

@@ -0,0 +1,26 @@
+: linux.pentium4 gcc wrapper : 2005-10-24 :
+
+HOSTTYPE=linux.pentium4
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+case " $* " in
+*" -O "*)
+	set -A argv -- "$@"
+	set -A nargv
+	integer i j
+	for ((i = j = 0; i < ${#argv[@]}; i++))
+	do	if	[[ ${argv[i]} == -O ]]
+		then	nargv[j++]=-O3
+			nargv[j++]=-march=pentium4
+		else	nargv[j++]=${argv[i]}
+		fi
+	done
+	gcc "${nargv[@]}"
+	exit
+	;;
+esac
+
+gcc "$@"

+ 9 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sco.i386

@@ -0,0 +1,9 @@
+: sco.i386 cc wrapper with reasonable binary and namespace : 1998-02-04 :
+
+HOSTTYPE=sco.i386
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+/bin/cc -b elf -D_SVID3 "$@"

+ 68 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips2

@@ -0,0 +1,68 @@
+: sgi.mips2 cc wrapper that generates mips2 binaries : 2006-02-14 :
+
+HOSTTYPE=sgi.mips2
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+cc=/usr/bin/cc
+debug=
+dynamic=-G0
+flags=-OPT:Olimit=0
+ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433
+ldignore=15,84,85,13
+optimize=
+
+case $_AST_cc_OPTIONS in
+?*)	eval $_AST_cc_OPTIONS ;;
+esac
+case $ignore in
+?*)	ignore="-woff $ignore" ;;
+esac
+case $ldignore in
+?*)	ifs=$IFS
+	IFS=,
+	v=$ldignore
+	ldignore=
+	for i in $v
+	do	ldignore="$ldignore -Wl,-woff,$i"
+	done
+	IFS=$ifs
+	;;
+esac
+case $debug in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-g*)	case $debug in
+			-)	continue ;;
+			esac
+			i=$debug
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+case $optimize in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-O*)	case $optimize in
+			-)	continue ;;
+			esac
+			i=$optimize
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+
+if	test -d /usr/lib32
+then	LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@"
+else	$cc -mips2 $flags $ignore "$@"
+fi

+ 110 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3

@@ -0,0 +1,110 @@
+: sgi.mips3 cc wrapper that generates mips3 binaries : 2007-04-27 :
+
+HOSTTYPE=sgi.mips3
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+# ld:
+#	  15
+#	  84
+#	  85
+#	 134
+# cc:
+#	1685 (first!!) Invalid error number: X.
+#	1035 cpp #error -- 0 exit status by default - botch botch botch
+#	1048
+#	1155
+#	1171 The indicated expression has no effect.
+#	1184 "=" is used where where "==" may have been intended.
+#	1209 The controlling expression is constant.
+#	1343
+#	3169 X not marked as intrinsic because it is not yet declared
+#	3170 X not marked as intrinsic because it is not yet declared
+#	3421 expecting function name #pragma intrinsic (X)
+#	3433 X not marked as intrinsic because it is not yet declared
+#	3434 X not marked as intrinsic because it is not yet declared
+
+cc=/usr/bin/cc
+debug=
+dynamic=-G0
+flags=-OPT:Olimit=0
+fatal=1035
+ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3421,3433,3434
+ldignore=15,84,85,13
+optimize=
+
+case $_AST_cc_OPTIONS in
+?*)	eval $_AST_cc_OPTIONS ;;
+esac
+case $fatal in
+?*)	fatal="-diag_error $fatal" ;;
+esac
+case $ignore in
+?*)	ignore="-woff $ignore" ;;
+esac
+case $ldignore in
+?*)	ifs=$IFS
+	IFS=,
+	v=$ldignore
+	ldignore=
+	for i in $v
+	do	ldignore="$ldignore -Wl,-woff,$i"
+	done
+	IFS=$ifs
+	;;
+esac
+case $debug in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-g*)	case $debug in
+			-)	continue ;;
+			esac
+			i=$debug
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+case $optimize in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-O*)	case $optimize in
+			-)	continue ;;
+			esac
+			i=$optimize
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+
+case $1 in
+-mips2)	if	test -d /usr/lib32
+	then	LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@"
+	else	$cc -mips2 $flags $ignore "$@"
+	fi
+	;;
+-mips4)	case " $* " in
+	*" -ldl "*)
+		integer n=0
+		for i
+		do	case $i in
+			-ldl)	;;
+			*)	a[n++]=$i ;;
+			esac
+		done
+		set -- ${a[@]}
+	esac
+	$cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@"
+	;;
+*)	$cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@"
+	;;
+esac

+ 65 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips3-o32

@@ -0,0 +1,65 @@
+: sgi.mips3-o32 cc wrapper that generates mips3 o32 binaries : 2006-02-14 :
+
+HOSTTYPE=sgi.mips3-o32
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+cc=/usr/bin/cc
+debug=
+dynamic=-G0
+flags=
+ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433
+ldignore=15,84,85,13
+optimize=
+
+case $_AST_cc_OPTIONS in
+?*)	eval $_AST_cc_OPTIONS ;;
+esac
+case $ignore in
+?*)	ignore="-woff $ignore" ;;
+esac
+case $ldignore in
+?*)	ifs=$IFS
+	IFS=,
+	v=$ldignore
+	ldignore=
+	for i in $v
+	do	ldignore="$ldignore -Wl,-woff,$i"
+	done
+	IFS=$ifs
+	;;
+esac
+case $debug in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-g*)	case $debug in
+			-)	continue ;;
+			esac
+			i=$debug
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+case $optimize in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-O*)	case $optimize in
+			-)	continue ;;
+			esac
+			i=$optimize
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+
+$cc -o32 -mips3 $flags $dynamic $ldignore $ignore "$@"

+ 90 - 0
cde/programs/dtksh/ksh93/src/cmd/INIT/cc.sgi.mips4

@@ -0,0 +1,90 @@
+: sgi.mips4 cc wrapper that generates mips4 binaries : 2007-04-27 :
+
+HOSTTYPE=sgi.mips4
+
+case " $* " in
+*" -dumpmachine "*) echo $HOSTTYPE; exit ;;
+esac
+
+cc=/usr/bin/cc
+debug=
+dynamic=-G0
+flags=-OPT:Olimit=0
+fatal=1035
+ignore=1685,733,1048,1155,1171,1184,1209,1343,3169,3170,3433
+ldignore=15,84,85,13
+optimize=
+
+case $_AST_cc_OPTIONS in
+?*)	eval $_AST_cc_OPTIONS ;;
+esac
+case $fatal in
+?*)	fatal="-diag_error $fatal" ;;
+esac
+case $ignore in
+?*)	ignore="-woff $ignore" ;;
+esac
+case $ldignore in
+?*)	ifs=$IFS
+	IFS=,
+	v=$ldignore
+	ldignore=
+	for i in $v
+	do	ldignore="$ldignore -Wl,-woff,$i"
+	done
+	IFS=$ifs
+	;;
+esac
+case $debug in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-g*)	case $debug in
+			-)	continue ;;
+			esac
+			i=$debug
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+case $optimize in
+?*)	integer n=0
+	for i
+	do	case $i in
+		-O*)	case $optimize in
+			-)	continue ;;
+			esac
+			i=$optimize
+			;;
+		esac
+		a[n++]=$i
+	done
+	set -- ${a[@]}
+	;;
+esac
+
+case $1 in
+-mips2)	if	test -d /usr/lib32
+	then	LD_LIBRARYN32_PATH=/lib32 $cc -32 -mips2 $flags $dynamic $ldignore $ignore "$@"
+	else	$cc -mips2 $flags $ignore "$@"
+	fi
+	;;
+-mips3)	$cc -n32 -mips3 $flags $dynamic $fatal $ldignore $ignore "$@"
+	;;
+*)	case " $* " in
+	*" -ldl "*)
+		integer n=0
+		for i
+		do	case $i in
+			-ldl)	;;
+			*)	a[n++]=$i ;;
+			esac
+		done
+		set -- ${a[@]}
+	esac
+	$cc -64 -mips4 $flags $dynamic $fatal $ldignore $ignore "$@"
+	;;
+esac

Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff