misc.c
changeset 387 4fc309c3ba74
parent 286 b22e852634e4
child 395 788a9bba0889
equal deleted inserted replaced
386:5e7e75f9b3ea 387:4fc309c3ba74
    73 	int i;
    73 	int i;
    74 	for (i=0; i<MAX_PLAYERS; i++) {
    74 	for (i=0; i<MAX_PLAYERS; i++) {
    75 		_player_seeds[i][0]=InteractiveRandom();
    75 		_player_seeds[i][0]=InteractiveRandom();
    76 		_player_seeds[i][1]=InteractiveRandom();
    76 		_player_seeds[i][1]=InteractiveRandom();
    77 		}
    77 		}
    78 }
       
    79 
       
    80 void memswap(void *a, void *b, size_t size) {
       
    81 	void *c = alloca(size);
       
    82 	memcpy(c, a, size);
       
    83 	memcpy(a, b, size);
       
    84 	memcpy(b, c, size);
       
    85 }
    78 }
    86 
    79 
    87 void SetDate(uint date)
    80 void SetDate(uint date)
    88 {
    81 {
    89 	YearMonthDay ymd;
    82 	YearMonthDay ymd;