Rename length status item to seconds_total and print it only once.
[paraslash.git] / para.h
diff --git a/para.h b/para.h
index 52fe36994b0a42c0e8be999c93746a7e7f48ed59..9fe316ed7454ed101cf2f66f2b04109f24c463dd 100644 (file)
--- a/para.h
+++ b/para.h
@@ -167,8 +167,10 @@ 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_AUDIOD_UPTIME,       SI_IMAGE_ID,            NUM_STAT_ITEMS
+       SI_SECONDS_TOTAL,       SI_STREAM_START,        SI_CURRENT_TIME,
+       SI_AUDIOD_UPTIME,       SI_IMAGE_ID,            SI_LYRICS_ID,
+       SI_DURATION,
+       NUM_STAT_ITEMS
 };
 
 int stat_item_valid(const char *item);
@@ -217,9 +219,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 */