4 #define NB_RAND 0x10000
6 #define RAND_INIT(gd,i) \
8 if (gd->rand_tab == NULL) \
9 gd->rand_tab = g_malloc (NB_RAND * sizeof(gint)) ;\
11 while (gd->rand_pos < NB_RAND) \
12 gd->rand_tab [gd->rand_pos++] = rand ();
15 (gd->rand_tab[gd->rand_pos = ((gd->rand_pos + 1) % NB_RAND)])
17 #define RAND_CLOSE(gd) \
18 g_free (gd->rand_tab); \
21 /*#define iRAND(i) ((guint32)((float)i * RAND()/RAND_MAX)) */
22 #define iRAND(gd,i) (RAND(gd) % i)