|
Lines 563-569
Link Here
|
| 563 |
/* If there are entries */ |
563 |
/* If there are entries */ |
| 564 |
if (g_list_length(skinlist)) { |
564 |
if (g_list_length(skinlist)) { |
| 565 |
/* Get a random value to select the skin to use */ |
565 |
/* Get a random value to select the skin to use */ |
| 566 |
int randval = random() % (g_list_length(skinlist) + 1); |
566 |
#if defined(sun) |
|
|
567 |
int randval = (gint)(random() / (INT_MAX + 1.0) * (g_list_length(skinlist) + 1)); |
| 568 |
#else |
| 569 |
int randval = (gint)(random() / (RAND_MAX + 1.0) * (g_list_length(skinlist) + 1)); |
| 570 |
#endif |
| 567 |
/* If the random value is 0, use the default skin */ |
571 |
/* If the random value is 0, use the default skin */ |
| 568 |
/* Otherwise subtract 1 from the random value and */ |
572 |
/* Otherwise subtract 1 from the random value and */ |
| 569 |
/* select the skin */ |
573 |
/* select the skin */ |