1$OpenBSD: PROJECTS,v 1.6 2004/12/18 20:55:52 millert Exp $ 2 3Things to be done in pdksh (see also the NOTES file): 4 5 * builtin utilities: 6 pdksh has most if not all POSIX/at&t ksh builtins, but they need to 7 be checked that they conform to POSIX/at&t manual. Part of the 8 process is changing the builtins to use the ksh_getopt() routine. 9 10 The following builtins, which are defined by POSIX, haven't been 11 examined: 12 eval 13 14 The first pass has been done on the following commands: 15 . : alias bg break cd continue echo exec exit export false fc fg 16 getopts jobs kill pwd read readonly return set shift time trap true 17 umask unalias unset wait 18 19 The second pass (ie, believed to be completely POSIX) has been done on 20 the following commands: 21 test 22 23 (ulimit also needs to be examined to check that it fits the posix style) 24 25 * test suite 26 Ideally, as the builtin utilities are being POSIXized, short tests 27 should be written to be used in regression testing. The tests 28 directory contains some tests, but many more need to be written. 29 30 * internationalization 31 Need to handle with the LANG and LC_* environment variables. This 32 involves changes to ensure <ctype.h> macros are being used (currently 33 uses its own macros in many places), figuring out how to deal with 34 bases (for integer arithmetic, eg, 12#1A), and (the nasty one) doing 35 string look ups for error messages, etc.. It probably isn't worth 36 translating strings to other languages yet as the code is likely 37 to change a lot in the near future, but it would be good to have the 38 code set up so string tables can be used. 39 40 * trap code 41 * add the DEBUG trap. 42 * fix up signal handling code. In particular, fatal vs tty signals, 43 have signal routine to call to check for pending/fatal traps, etc. 44 45 * parsing 46 * the time keyword needs to be hacked to accept options (!) since 47 POSIX says it shall accept the -p option and must skip a -- argument 48 (end of options). Yuck. 49 50 * lexing 51 the lexing may need a re-write since it currently doesn't parse $( .. ), 52 $(( .. )), (( ... )) properly. 53 * need to ignore contents of quoted strings (and escaped chars?) 54 inside $( .. ) and $(( .. )) when counting parentheses. 55 * need to put bounds check on states[] array (if it still exists after 56 the re-write) 57 58 * variables 59 * The "struct tbl" that is currently used for variables needs work since 60 more information (eg, array stuff, fields) are needed for variables 61 but not for the other things that use "struct tbl". 62 * Arrays need to be implemented differently: currently does a linear 63 search of a linked list to find element i; the linked list is not 64 freed when a variable is unset. 65 66 * functions 67 finish the differences between function x and x(): trap EXIT, traps 68 in general, treatment of OPTIND/OPTARG, 69 70 * history 71 There are two versions of the history code, COMPLEX_HISTORY and 72 EASY_HISTORY, which need to be merged. COMPLEX does at&t style history 73 where the history file is written after each command and checked when 74 ever looking through the history (in case another shell has added 75 something). EASY simply reads the history file at startup and writes 76 it before exiting. 77 * re-write the COMPLEX_HISTORY code so mmap() not needed (currently 78 can't be used on machines without mmap()). 79 * Add multiline knowledge to COMPLEX_HISTORY (see EASY_HISTORY 80 stuff). 81 * change COMPLEX_HISTORY code so concurrent history files are 82 controlled by an option (set -o history-concurrent?). Delete 83 the EASY_HISTORY code. 84 * bring history code up to POSIX standards (see POSIX description 85 of fc, etc.). 86 87 * documentation 88 Some sort of tutorial with examples would be good. Texinfo is probably 89 the best medium for this. Also, the man page could be converted to 90 texinfo (if the tutorial and man page are put in the same texinfo 91 page, they should be somewhat distinct - i.e., the tutorial should 92 be a separate thread - but there should be cross references between the 93 two). 94 95 * miscellaneous 96 * POSIX specifies what happens when various kinds of errors occur 97 in special built-ins commands vs regular commands (builtin or 98 otherwise) (see POSIX.2:3.8.1). Some of this has been taken 99 care of, but more needs doing. 100 101 * remove static limits created by fixed sized arrays 102 (eg, ident[], heres[], PATH, buffer size in emacs/vi code) 103 104 * merge the emacs and vi code (should reduce the size of the shell and 105 make maintenance easier); handle SIGWINCH while editing a line. 106 [John Rochester is working on the merge] 107 108 * add POSIX globbing (eg, [[:alnum:]]), see POSIX.2:2.8.3.2. 109 110 * teach shf_vfprintf() about long long's (%lld); also make %p use 111 long longs if appropriate. 112 113 * decide wether to keep currently disabled FP stuff in shf.c; if 114 not, eliminate ksh_limval.h (moving BITS to var.c). 115