Mercurial > hg > early-roguelike
comparison arogue7/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 | f9ef86cf22b2 | 
| children | d3968e9cb98d | 
   comparison
  equal
  deleted
  inserted
  replaced
| 251:e7862a021609 | 252:3d4252fa2ed3 | 
|---|---|
| 252 environ = envp; | 252 environ = envp; | 
| 253 strcpy(file_name, file); | 253 strcpy(file_name, file); | 
| 254 setup(); | 254 setup(); | 
| 255 clearok(curscr, TRUE); | 255 clearok(curscr, TRUE); | 
| 256 touchwin(cw); | 256 touchwin(cw); | 
| 257 srand(getpid()); | 257 srand(md_random_seed()); | 
| 258 playit(); | 258 playit(); | 
| 259 /*NOTREACHED*/ | 259 /*NOTREACHED*/ | 
| 260 return(0); | 260 return(0); | 
| 261 } | 261 } | 
| 262 | 262 | 
