- static uint32_t randLong()
- {
- // Assume 8-bit (or larger) rand values. Also assume
- // that the system rand() function is very poor, which it always is.
- uint32_t d;
- uint32_t i;
- char* poke = (char*)&d;
- for (i=0; i < sizeof(uint32_t); ++i)
- {
- poke[i] = (char)(rand() & 0xFF);
- }
- return d;
- }