X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;ds=sidebyside;f=index.c;h=543b53eb729c5d0d7a7e17f070b7de705accc1aa;hb=2a1b9e35299ad8d2bb54882bcd5786953179af38;hp=f078d0a7aed4527a072b63bc0a3227b69f5bb97f;hpb=809700c0054c4d0afc399e1a58e51f3afedee14a;p=~andy%2Faweather-web diff --git a/index.c b/index.c index f078d0a..543b53e 100644 --- a/index.c +++ b/index.c @@ -1,3 +1,4 @@ +#include #include #include #include "html.h" @@ -11,6 +12,7 @@ const char desc[] = page_t header[] = { {"about", "About", print_about, 0.7, NULL}, {"news", "News", print_news, 0.3, NULL}, + {"manual", "Manual", print_manual, 0.5, NULL}, {"screenshots", "Screenshots", print_screenshots, 0.5, NULL}, {"download", "Download", print_download, 0.7, NULL}, {"development", "Development", print_development, 0.3, NULL}, @@ -33,7 +35,18 @@ page_t special[] = { }; const page_t *everything[] = {header, other, footer, special, NULL}; const page_t *index = &special[0]; -const page_t *notfound = &special[1]; +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)