summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorJon Bergli Heier <snakebite@jvnv.net>2009-08-14 02:05:59 +0200
committerJon Bergli Heier <snakebite@jvnv.net>2009-08-14 02:05:59 +0200
commit6ca9bdc3559e541ad636d283a57ddf22d77b47cf (patch)
tree09ce862ae0c222996b756dc46994d40c4b926b0b /main.c
parent5acf08a2e540d68093566c006e45572849589750 (diff)
parentbd1f1deafc7f1fec1612d3776377f685f056e5f7 (diff)
Merge branch 'master' of ssh://athena/mnt/scm/git/ircstats
Diffstat (limited to 'main.c')
-rw-r--r--main.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/main.c b/main.c
index 9f822ed..a3b3c7e 100644
--- a/main.c
+++ b/main.c
@@ -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();