summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
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();