#ifndef DISPLAY_TIME_H
#define DISPLAY_TIME_H

# ifdef DISPLAY_TIME_C

/* str length has to be at least about 30 for some functions and 8 
  for others */
# define MAX_TIME_STR 150
# define MAX_TIME_ARRAY 5

/* we can run a few functions in the same parameter list */
static char time_string[MAX_TIME_ARRAY][MAX_TIME_STR];
static int time_str_offset = 0;

/* it starts at one and uses, file, global varibales... but */
# define GET_TIME_OFFSET time_str_offset = \
                         ((time_str_offset + 1) % MAX_TIME_ARRAY)
# define GET_TIME_STR() time_string[GET_TIME_OFFSET]
                               
# endif

                               /* defines for word_time */
#define USE_YEARS (1<<0)
#define USE_WEEKS (1<<1)
#define USE_DAYS (1<<2)
#define USE_HOURS (1<<3)
#define USE_MINUTES (1<<4)
#define USE_SECONDS (1<<5)
#define USE_MOD_YEARS (0) /* doesn't do anything as year is biggest */
#define USE_MOD_WEEKS (1<<6)
#define USE_MOD_DAYS (1<<7)
#define USE_MOD_HOURS (1<<8)
#define USE_MOD_MINUTES (1<<9)
#define USE_MOD_SECONDS (1<<10)
#define USE_STICK_YEARS (1<<11)
#define USE_STICK_WEEKS (1<<12)
#define USE_STICK_DAYS (1<<13)
#define USE_STICK_HOURS (1<<14)
#define USE_STICK_MINUTES (1<<15)
#define USE_STICK_SECONDS (1<<16)


#define USE_SECS_MINS (USE_SECONDS | USE_MINUTES)
#define USE_SECS_MINS_HRS (USE_SECS_MINS | USE_HOURS)
#define USE_SECS_MINS_HRS_DAYS (USE_SECS_MINS_HRS | USE_DAYS)
#define USE_SECS_MINS_HRS_DAYS_WKS (USE_SECS_MINS_HRS_DAYS | USE_WEEKS)
#define WORD_TIME_ALL (USE_SECS_MINS_HRS_DAYS_WKS | USE_YEARS)
#define WORD_TIME_DEFAULT (USE_SECS_MINS_HRS_DAYS)
#define USE_MOD_ALL (USE_MOD_WEEKS | USE_MOD_DAYS | USE_MOD_HOURS | USE_MOD_MINUTES | USE_MOD_SECONDS)
#define USE_STICK_ALL (USE_STICK_YEARS | USE_STICK_WEEKS | USE_STICK_DAYS | USE_STICK_HOURS | USE_STICK_MINUTES | USE_STICK_SECONDS)
                               
#endif
