diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-14 01:25:46 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-14 01:25:46 +0200 |
commit | bd1f1deafc7f1fec1612d3776377f685f056e5f7 (patch) | |
tree | 9fecbb541bd8e1c3094c8d0d6eebf2439947be73 /main.c | |
parent | 150589a813b8ab1cbcd7697c2b8f48a6adcab2d2 (diff) |
Main loop groundwork.
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -17,6 +17,28 @@ int main(int argc, char **argv) { } /* Parsing stuff goes here. */ + for(int chan_i = 0; chan_i < channel_get_count(); chan_i++) { + struct channel_t *channel = channel_get(chan_i); + printf("Channel %s\n", channel->name); + struct channel_file_t *file = channel->files; + while(file) { + struct regexset_t *rs = file->rs; + FILE *f = fopen(file->path, "r"); + if(!f) { + fprintf(stderr, "\tFailed to open %s\n", file->path); + file = file->next; + continue; + } else + printf("\tParsing %s\n", file->path); + + char line[0x2ff]; + while(fgets(line, 0x2ff, f)) { + // TODO: Magic. + } + + file = file->next; + } + } cfg_free(); channel_free(); |