Make the status item list globally visible.
[paraslash.git] / para.h
diff --git a/para.h b/para.h
index 9f2c59a885aa2ee028de2056e23641575f9c8ad6..69383dbe65492734fbedd49d9525cddee4bc1119 100644 (file)
--- 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 */