Mercurial > hg > early-roguelike
comparison srogue/save.c @ 252:3d4252fa2ed3
Use more portable random seed generation.
The new function md_random_seed() has replaced time() + getpid() and
similar methods. Putting everything in mdport.c slightly reduces the
warnings and workarounds.
| author | John "Elwin" Edwards |
|---|---|
| date | Sat, 28 Jan 2017 15:49:41 -0500 |
| parents | 163bd1fd4766 |
| children | d3968e9cb98d |
comparison
equal
deleted
inserted
replaced
| 251:e7862a021609 | 252:3d4252fa2ed3 |
|---|---|
| 300 environ = envp; | 300 environ = envp; |
| 301 | 301 |
| 302 strcpy(file_name, file); | 302 strcpy(file_name, file); |
| 303 setup(); | 303 setup(); |
| 304 restscr(cw); | 304 restscr(cw); |
| 305 md_srandom(md_getpid()); | 305 md_srandom(md_random_seed()); |
| 306 playit(); | 306 playit(); |
| 307 } | 307 } |
