Rev 272 | Rev 276 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 272 | Rev 274 | ||
---|---|---|---|
Line 458... | Line 458... | ||
458 | // https://github.com/open-watcom/open-watcom-v2/blob/master/bld/clib/math/c/rand.c |
458 | // https://github.com/open-watcom/open-watcom-v2/blob/master/bld/clib/math/c/rand.c |
459 | *seed = *seed * 1103515245L + 12345L; |
459 | *seed = *seed * 1103515245L + 12345L; |
460 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
460 | return (*seed >> 16) & 0x7fff; /* Scale between 0 and RAND_MAX */ |
461 | } |
461 | } |
462 | 462 | ||
- | 463 | // TODO: obfusc() must be compiler independent again, otherwise the 32/64 cross-create won't work! |
|
- | 464 | ||
463 | void obfusc(PARM_T* pparm) { |
465 | void obfusc(PARM_T* pparm) { |
464 | unsigned char* p; |
466 | unsigned char* p; |
465 | size_t i; |
467 | size_t i; |
466 | unsigned int seed; |
468 | unsigned int seed; |
467 | size_t size, seed_position; |
469 | size_t size, seed_position; |