diff options
author | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-14 02:05:59 +0200 |
---|---|---|
committer | Jon Bergli Heier <snakebite@jvnv.net> | 2009-08-14 02:05:59 +0200 |
commit | 6ca9bdc3559e541ad636d283a57ddf22d77b47cf (patch) | |
tree | 09ce862ae0c222996b756dc46994d40c4b926b0b /main.c | |
parent | 5acf08a2e540d68093566c006e45572849589750 (diff) | |
parent | bd1f1deafc7f1fec1612d3776377f685f056e5f7 (diff) |
Merge branch 'master' of ssh://athena/mnt/scm/git/ircstats
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(); |