X-Git-Url: http://pileus.org/git/?p=~andy%2Faweather-web;a=blobdiff_plain;f=index.c;h=304293d174754068b5a86e5bce5cb9672b2eedf0;hp=7877fb073c3dfae7d1278950eb47cb730fcbd34b;hb=3934139d14007a885a99e2a2517446998df3dac0;hpb=dd93f3cd564549ffd28f5647f443d5a4f7b8df20 diff --git a/index.c b/index.c index 7877fb0..304293d 100644 --- a/index.c +++ b/index.c @@ -1,3 +1,4 @@ +#include #include #include #include "html.h" @@ -10,6 +11,7 @@ const char desc[] = /* Page data */ page_t header[] = { {"about", "About", print_about, 0.7, NULL}, + {"manual", "Manual", print_manual, 0.5, NULL}, {"news", "News", print_news, 0.3, NULL}, {"screenshots", "Screenshots", print_screenshots, 0.5, NULL}, {"download", "Download", print_download, 0.7, NULL}, @@ -35,6 +37,17 @@ const page_t *everything[] = {header, other, footer, special, NULL}; const page_t *index = &special[0]; const page_t *notfound = &special[2]; +/* Helper functions */ +void print_file(char *file) +{ + char data[512]; + FILE *fd = fopen(file, "r"); + while (!feof(fd)) { + size_t size = fread(data, 1, sizeof(data), fd); + fwrite(data, 1, size, stdout); + } +} + /* Main */ int main(int argc, char **argv) {