From 150589a813b8ab1cbcd7697c2b8f48a6adcab2d2 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Thu, 13 Aug 2009 15:25:47 +0200 Subject: Store files as a linked list. --- channel.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'channel.h') diff --git a/channel.h b/channel.h index cda0df5..5ad75ea 100644 --- a/channel.h +++ b/channel.h @@ -6,18 +6,17 @@ struct channel_file_t { char *path; struct regexset_t *rs; + struct channel_file_t *next; }; struct channel_t { char *name; - int file_count; struct channel_file_t *files; }; void channel_init(); struct channel_t *channel_add(const char *name); -int channel_set_file_count(struct channel_t *channel, int count); -int channel_set_file(struct channel_t *channel, int index, const char *path, int rs_index); +struct channel_file_t *channel_file_add(struct channel_t *channel, const char *path, int rs_index); void channel_free(); #endif -- cgit v1.2.3 From bd1f1deafc7f1fec1612d3776377f685f056e5f7 Mon Sep 17 00:00:00 2001 From: Jon Bergli Heier Date: Fri, 14 Aug 2009 01:25:46 +0200 Subject: Main loop groundwork. --- channel.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'channel.h') diff --git a/channel.h b/channel.h index 5ad75ea..73f2dde 100644 --- a/channel.h +++ b/channel.h @@ -17,6 +17,8 @@ struct channel_t { void channel_init(); struct channel_t *channel_add(const char *name); struct channel_file_t *channel_file_add(struct channel_t *channel, const char *path, int rs_index); +int channel_get_count(); +struct channel_t *channel_get(int index); void channel_free(); #endif -- cgit v1.2.3