factor out rndget() code, for adding users

XXX in the future, the entire scheme must be rethinked when we need more
XXX entropy for the hash tables; possibly a cheap add using NZAT and re-
XXX initialise the LCG only on access and when added (so keep NZAT state
XXX separate from LCG state); also, then we will need a more elaborate
XXX scheme, such as adding from environment, editor keypresses and timing
This commit is contained in:
tg
2012-04-14 14:35:13 +00:00
parent b497da1eb4
commit 70e6988d25
2 changed files with 14 additions and 7 deletions

3
sh.h
View File

@@ -152,7 +152,7 @@
#endif
#ifdef EXTERN
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.547 2012/04/14 14:07:47 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/sh.h,v 1.548 2012/04/14 14:35:12 tg Exp $");
#endif
#define MKSH_VERSION "R40 2012/04/07"
@@ -1888,6 +1888,7 @@ size_t array_ref_len(const char *);
char *arrayname(const char *);
mksh_uari_t set_array(const char *, bool, const char **);
uint32_t hash(const void *);
mksh_ari_t rndget(void);
void rndset(long);
enum Test_op {