summaryrefslogtreecommitdiff
path: root/channel.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2009-08-14 01:25:46 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2009-08-14 01:25:46 +0200
commitbd1f1deafc7f1fec1612d3776377f685f056e5f7 (patch)
tree9fecbb541bd8e1c3094c8d0d6eebf2439947be73 /channel.c
parent150589a813b8ab1cbcd7697c2b8f48a6adcab2d2 (diff)
Main loop groundwork.
Diffstat (limited to 'channel.c')
-rw-r--r--channel.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/channel.c b/channel.c
index cdd1748..065e606 100644
--- a/channel.c
+++ b/channel.c
@@ -42,6 +42,14 @@ struct channel_file_t *channel_file_add(struct channel_t *channel, const char *p
return file;
}
+int channel_get_count() {
+ return channel_count;
+}
+
+struct channel_t *channel_get(int index) {
+ return (index < channel_count ? &channels[index] : NULL);
+}
+
void channel_free() {
for(int i = 0; i < channel_count; i++) {
free(channels[i].name);