X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=para.h;h=69383dbe65492734fbedd49d9525cddee4bc1119;hp=9f2c59a885aa2ee028de2056e23641575f9c8ad6;hb=f513183bb624dc785de48b556cca7a876b0e7754;hpb=82f73e338ee087647f2c38250f1af1e225cd1f51 diff --git a/para.h b/para.h index 9f2c59a8..69383dbe 100644 --- a/para.h +++ b/para.h @@ -167,11 +167,14 @@ enum { SI_AUDIO_INFO3, SI_AFS_MODE, SI_ATTRIBUTES, SI_DIRECTORY, SI_DECODER_FLAGS, SI_AUDIOD_STATUS, SI_PLAY_TIME, SI_UPTIME, SI_OFFSET, - SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME, + SI_SECONDS_TOTAL, SI_STREAM_START, SI_CURRENT_TIME, SI_AUDIOD_UPTIME, SI_IMAGE_ID, SI_LYRICS_ID, + SI_DURATION, NUM_STAT_ITEMS }; +extern const char *status_item_list[NUM_STAT_ITEMS]; + int stat_item_valid(const char *item); int stat_line_valid(const char *); void stat_client_write(const char *msg, int itemnum); @@ -218,9 +221,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 */