--- src/lib/libc/stdlib/random.c 2005/11/20 14:58:40 1.8 +++ src/lib/libc/stdlib/random.c 2005/11/24 17:18:30 1.9 @@ -336,6 +336,11 @@ srandomdev(void) * Note: the first thing we do is save the current state, if any, just like * setstate() so that it doesn't matter when initstate is called. * + * Parameters: + * seed: seed for R.N.G. + * arg_state: pointer to state array + * n: # bytes of state info + * * Returns a pointer to the old state. * * Note: The Sparc platform requires that arg_state begin on an int @@ -343,9 +348,7 @@ srandomdev(void) * complain about mis-alignment, but you should disregard these messages. */ char * -initstate(unsigned long seed, /* seed for R.N.G. */ - char *arg_state, /* pointer to state array */ - long n) /* # bytes of state info */ +initstate(unsigned long seed, char *arg_state, long n) { char *ostate = (char *)(&state[-1]); uint32_t *int_arg_state = (uint32_t *)(void *)arg_state; @@ -403,6 +406,9 @@ initstate(unsigned long seed, /* seed f * Note that due to the order in which things are done, it is OK to call * setstate() with the same state as the current state. * + * Parameters: + * arg_state: pointer to state array + * * Returns a pointer to the old state information. * * Note: The Sparc platform requires that arg_state begin on a long @@ -410,7 +416,7 @@ initstate(unsigned long seed, /* seed f * complain about mis-alignment, but you should disregard these messages. */ char * -setstate(char *arg_state) /* pointer to state array */ +setstate(char *arg_state) { uint32_t *new_state = (uint32_t *)(void *)arg_state; uint32_t type = new_state[0] % MAX_TYPES;