#include <stdio.h>
#include <gtk/gtk.h>
#include "data.h"

/* initialise the entries list */
void entry_initialise();

void entry_highlight_inactive(int row);

void entry_highlight_active(int row);

void entry_highlight_connect(int row);

/* update a specific entry in the list */
void entry_update (int row, struct ed *ed);

/* update all entries in the list */
void entry_refresh();

/* set all entries to zero, for midnight rollover */
void entry_reset();

/* append an entry to the list given a name and time */
void entry_append (char *name, time_t time);

/* append an entry to the list given a name and time */
struct ed *entry_append_internal (char *name, time_t time);

/* remove an entry */
void entry_remove (struct ed *ed);

/* per-entry function - save the entry name to the names file */
void entry_save_name (gpointer data, gpointer user_data);

/* per-entry function - save the entry name and time to the per-day file */
void entry_save_data (gpointer data, gpointer user_data);

/* open a save file, reporting any errors */
FILE *entry_save_open (char *prefix, char *suffix);

/* save the entry database */
void entry_save();

/* load the entry database from file */
void entry_load();

void entry_create();

void entry_edit();

void entry_delete();
