On Fri, 28 Apr 2006 16:21:04 -0700 (PDT) April Chin wrote:
> We can't make a *complete* list, but we can at least generate a list of
> incompatibilities we know about, starting with the ksh88 vs. ksh93
> compatibility list. This is something I have been
> looking at. And we'd also need to address the Solaris ksh enhancements
> (such as long option support to the getopts builtin) before ksh93
> becomes /usr/bin/ksh.
ksh93 has its own mechanism for long options via the libast optget()
optget() also supports man page style documentation with i18n hooks
so that long name options may be specified in the C/POSIX locale
english and the i18n locale
I just modifed optget() to handle the solaris old style long option style
'f:(file)(input-file)g(global)o:(output)(output-file)'
is treated as
'[-][f:file|input-file]:[string][g:global][o:output|output-file]:[string]'
ksh93 getopts --man documents the long options + documentation syntax
the --usage options lists the option string for any ksh93 builtin or script
that uses the builtin getopts (or any other ast command)
so ksh93 getopts --usage now also serves as a translator from solaris style to
ksh93
the ast fmt -o pretty prints the option string
try
wait --usage 2>&1 | fmt -o
the --key option lists the strings to be translated for i18n locales
the C locale string is used as a lookup key
libast handles the mapping between C locale string keys and
message catalog indices
-- Glenn Fowler -- AT&T Research, Florham Park NJ --