hush/shell
Eric Andersen ef02f82bcf Paul Mundt, lethal at linux-sh dot org writes:
Here's a follow-up replacement to the patch I sent earlier, this adjusts some
of the semantics of the dynamic variable setting. Namely, dynamic vars can hook
a set handler (which RANDOM uses to adjust the seed). They'll only lose their
dynamic status if they're unset.

I've used the same approach that bash does to come up with the random number,
mostly just for consistency.

For example:

$ echo $RANDOM
13759
$ echo $RANDOM
20057
$ echo $RANDOM
1502
$ export RANDOM=42
$ echo $RANDOM
24179
$ echo $RANDOM
2046
$ unset RANDOM
$ echo $RANDOM

$ export RANDOM=42
$ echo $RANDOM
42
$
2004-03-11 13:34:24 +00:00
..
ash.c Paul Mundt, lethal at linux-sh dot org writes: 2004-03-11 13:34:24 +00:00
cmdedit.c Vodz. last_patch_128 2004-02-22 11:13:28 +00:00
cmdedit.h Vodz last_patch_122, Check $PATH at runtime to fix tab completion 2004-01-14 09:34:51 +00:00
Config.in Declare dependencies of command line editing in the build system 2004-01-03 12:07:32 +00:00
hush.c Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
lash.c Patch by Felipe Kellermann to fix a compiler compatability problem 2004-03-05 12:55:30 +00:00
Makefile Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
Makefile.in Update a bunch of docs. Run a script to update my email addr. 2003-07-14 21:21:08 +00:00
msh.c move all "-/bin/sh" "/bin/sh" and "sh" to libbb/messages.c file as one 2003-09-02 02:36:18 +00:00