Hi!

----

Attached is a small toy patch
("ksh93_depreciate_sh_access001.diff.txt.gz") which "depreciates" direct
access to |sh| as described in "include/shell.h":
-- snip --
direct access to sh is obsolete, use sh_getinterp() instead
-- snip --

Notes:
- The patch is a raw prototype patch for now (it runs and passes the
test suite but still needs some cleanup work and lots of removal of
redundant calls to |sh_getinterp()|), just to get some feedback whether
the general idea is Ok
- Most calls (I guess more than 5/6) to |sh_getinterp()| can be saved by
passing the value around as function argument or obtain it from the
matching structures (e.g. |Edit_t| etc.) without changing the interfaces
for public libshell functions. If this API could be changed (e.g. all
public interfaces take a |Shell_t *| as argument) one day the remaining
calls could be eliminated, too (which would be the first step to allow
more than one |Shell_t| within one application)
- The patch includes a hack for "pmain.c" to put |Shell_t| on the stack

Comments/suggestions/ideas/etc. welcome...

----

Bye,
Roland

-- 
  __ .  . __
 (o.\ \/ /.o) roland.mainz at nrubsig.org
  \__\/\/__/  MPEG specialist, C&&JAVA&&Sun&&Unix programmer
  /O /==\ O\  TEL +49 641 7950090
 (;O/ \/ \O;)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ksh93_depreciate_sh_access001.diff.txt.gz
Type: application/x-gzip
Size: 65846 bytes
Desc: not available
URL: 
<http://mail.opensolaris.org/pipermail/ksh93-integration-discuss/attachments/20070409/f17331f8/attachment.bin>

Reply via email to