X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=para.h;h=2d8d9cce390d5cb66fa7b3bea040210ff9426bb5;hp=258f8b8d83eb75ad3db75107f08412e8c51feaca;hb=045273c289eb3d972eea99df99967f680b06940f;hpb=e63886e85c55c99e9732e5715b7ce641eff09914 diff --git a/para.h b/para.h index 258f8b8d..2d8d9cce 100644 --- a/para.h +++ b/para.h @@ -168,7 +168,8 @@ enum { SI_DIRECTORY, SI_DECODER_FLAGS, SI_AUDIOD_STATUS, SI_PLAY_TIME, SI_UPTIME, SI_OFFSET, SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME, - SI_AUDIOD_UPTIME, SI_SELECTOR, NUM_STAT_ITEMS + SI_AUDIOD_UPTIME, SI_IMAGE_ID, SI_LYRICS_ID, + NUM_STAT_ITEMS }; int stat_item_valid(const char *item); @@ -217,9 +218,9 @@ __printf_2_3 void para_log(int, const char*, ...); * * \return An integer between zero and \p max - 1, inclusively. */ -static inline int para_random(unsigned max) +static inline long int para_random(unsigned max) { - return ((max + 0.0) * (rand() / (RAND_MAX + 1.0))); + return ((max + 0.0) * (random() / (RAND_MAX + 1.0))); } /** Round up x to a multiple of y */