1 --- src/aarender.c.orig Thu Apr 26 23:37:31 2001 2 +++ src/aarender.c Sat Mar 2 23:02:04 2002 3 @@ -27,11 +27,11 @@ 4 return (p); 5 } 6 #define MYLONG_MAX 0xffffffffU /*this is enought for me. */ 7 -#define myrand() (state = ((state * 1103515245) + 12345) & MYLONG_MAX) 8 +#define myrand() (random() & MYLONG_MAX) 9 10 void aa_renderpalette(aa_context * c, __AA_CONST aa_palette palette, __AA_CONST aa_renderparams * p, int x1, int y1, int x2, int y2) 11 { 12 - static int state; 13 + static int rand_init = 0; 14 int x, y; 15 int val; 16 int wi = c->imgwidth; 17 @@ -47,6 +47,11 @@ 18 int randomval = p->randomval; 19 int dither = p->dither; 20 aa_palette table; 21 + 22 + if (!rand_init) { 23 + srandomdev(); 24 + rand_init = 1; 25 + } 26 if (x2 < 0 || y2 < 0 || x1 > aa_scrwidth(c) || y1 > aa_scrheight(c)) 27 return; 28 if (x2 >= aa_scrwidth(c)) 29