Things to be done in pdksh (see also the NOTES file):

    * builtin utilities: 
      pdksh has most if not all POSIX/at&t ksh builtins, but they need to
      be checked that they conform to POSIX/at&t manual.  Part of the
      process is changing the builtins to use the ksh_getopt() routine.

      The following builtins, which are defined by POSIX, haven't been
      examined:
	cd eval fc time

      The first pass has been done on the following commands:
	. : alias bg break continue echo exec exit export false fg getopts
	jobs kill read readonly return set shift trap true umask unalias
	unset wait

      The second pass (ie, believed to be completely POSIX) has been done on
      the following commands:
	test

      (ulimit also needs to be examined to check it fits the posix style)

    * test suite
      Ideally, as the builtin utilities are being POSIXized, short tests
      should be written to be used in regression testing.  A dejagnu test
      bed is partly done (not distributed yet) for this.

    * documentation
      The pdksh manual needs to be brought up to date.  The builtin commands
      section should be done as the commands are POSIXized.
      Eventually, a texinfo version of the manual would be nice, but since
      things are under construction, its better just to have one manual to
      keep up to date.

    * trap code
	* add the DEBUG trap.
	* the fake sigaction code should use a wrapper signal handler to
	  restore the signal handler before calling the real signal handler
	  when using v7 signal routines; should also block signals while
	  the signal handler is running (this is tricky due to things
	  like SIGCHLD which can do strange things if ignored).

    * parsing
	* the time keyword needs to be hacked to accept options (!) since
	  POSIX says it shall accept the -p option and must skip a -- argument
	  (end of options).  Yuck.

    * lexing
      the lexing may need a re-write since it currently doesn't parse $( .. ),
      $(( .. )), "${...}" properly.
	* need to ignore contents of quoted strings (and escaped chars?)
	  inside $( .. ) and $(( .. )) when counting parentheses.
	* need to put bounds check on states[] array (if it still exists after
	  the re-write)

    * variables
	* The "struct tbl" that is currently used for variables needs work since
          more information (eg, array stuff, fields) are needed for variables
	  but not for the other things that use "struct tbl".
	* POSIX says tilde expansion on words in ${foo:word} - currently not
	  done.
	* Arrays need to be implemented differently: currently does a linear
	  search of a linked list to find element i; the linked list is not
	  freed when a variable is unset.

    * variable expansion
	* globbing isn't completely 8-bit clean (uses 0x80 as special char)

    * functions
      POSIX and at&t ksh functions are different in that POSIX functions
      don't change disable/restore traps and option parsing (OPTIND/OPTARG
      plus internal state) isn't saved/restored.  The suggestion made in
      POSIX.2 rationale is to have x() { .. } do the POSIX thing, and have
      function x { ..} do the at&t ksh thing.  So, should have two types of
      functions.

    * history
      There are two versions of the history code, COMPLEX_HISTORY and
      EASY_HISTORY, which need to be merged.  COMPLEX does at&t style history
      where the history file is written after each command and checked when
      ever looking through the history (in case another shell has added
      something).  EASY simply reads the history file at startup and writes
      it before exiting.
	* re-write the COMPLEX_HISTORY code so mmap() not needed (currently
	  can't be used on machines without mmap()).
	* Add multiline knowledge to COMPLEX_HISTORY (see EASY_HISTORY
	  stuff).
	* change COMPLEX_HISTORY code so concurrent history files are
	  controlled by an option (set -o history-concurrent?).  Delete
	  the EASY_HISTORY code.
	* bring history code up to POSIX standards( see POSIX description
	  of fc, etc.).

    * internationalization
      Need to handle with the LANG and LC_* environment variables.  This
      involves changes to ensure <ctype.h> macros are being used (currently
      uses its own macros in many places), figuring out how to deal with
      bases (for integer arithmetic, eg, 12#1A), and (the nasty one) doing
      string look ups for error messages, etc..  It probably isn't worth
      translating strings to other languages yet as the code is likely
      to change a lot in the near future, but it would be good to have the
      code set up so string tables can be used.

    * miscellaneous
	* error messages need to be fixed up to always be prefixed with
	  the shell name or a builtin-utility name.  May be good to have
	  this automatically inserted by errorf().

	* POSIX specifies what happens when various kinds of errors occur
	  in special built-ins commands vs regular commands (builtin or
	  otherwise) (see POSIX.2:3.8.1).  These need to be checked out.

	* remove static limits created by fixed sized arrays
	  (eg, line[], ident[], heres[], PATH, subtype(eval.c), states(lex.c),
	  buffer size in emacs/vi code)

	* merge the emacs and vi code (should reduce the size of the shell and
	  make maintenance easier).  Also, add the v (vi) command to vi mode.

	* shrink the shf code: some routines are never called, some
	  functionality is never used, and if removed, would simplify the code.

	* fix all the known bugs in the Bugs script and in the NOTES file

	* add POSIX globbing (eg, [[:alnum:]]), see POSIX.2:2.8.3.2.

	* catch SIGWINCH and update the COLUMNS and LINES parameters (also,
	  need to let the command line editor know of change - ideally this
	  would work even if the editor was currently reading commands).
