|
|
1.1 root 1: Fri Jul 10 22:45:42 1992 PDT
2: V3.3.3: extensive changes to implement shell functions,
3: as per specification provided by hal.
4: sh.h
5: Added tokens NFUNC, NRET and shell function type SHFUNC.
6: Added declarations for globals sh_fnp, in_sh_fn, ret_done.
7: sh.y
8: Added tokens _PARENS and _RET and syntax for return
9: and shell functions.
10: lex.c
11: Added "return" (_RET) and "()" (_PARENS).
12: extern.c
13: Added globals sh_fnp, in_sh_fn, ret_done.
14: exec1.c
15: In command(), added cases NFUNC (shell function definitions)
16: and NRET (return) and ret_done references to change control
17: flow after return. Added call to sh_fn() to look for shell
18: function calls.
19: exec2.c
20: In clone(), reset global sh_fnp to NULL in child so that
21: forked processes do not inherit shell functions.
22: exec3.c
23: Added code to implement shell function definition and execution.
24: lookup_sh_fn() looks up a shell function name,
25: def_sh_fn() defines a shell function, and
26: sh_fn() executes a shell function if appropriate.
27: Auxilliary routines copy_node() and free_node() do
28: the messiest part of the job.
29:
30: Tue Jul 14 15:06:56 1992 PDT
31: sh.h
32: Redefined NODE so that -VSINU compilation is no longer required.
33: lex.c
34: Added hashing to keyword lookup.
35:
36: Mon Mar 22 11:25:47 1993 PST
37: exec1.c
38: Integrated changes from non-function version, cf. sh/Changes.
39:
40: Fri May 7 05:34:29 1993 PDT
41: exec3.c
42: V4.0.5: In sh_fn, added code to save and restore sesp->s_con.
43: michael discovered that a shell function called from ANDAND
44: within a while-loop caused the old version to core dump.
45: The modified version essentially runs the shell function
46: in its own "break/continue" context, then restores the previous
47: "break/continue" context.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.