From b5c1bab0078cf1b40397727f9195fc39c4859660 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 8 May 2005 21:34:51 +0000 Subject: [PATCH] Prettier index pages --- mbsetup/m_archive.c | 132 +++++++++++++++++++++++--------------------- mbsetup/m_fido.c | 17 ++++-- mbsetup/m_modem.c | 14 +++-- mbsetup/m_tty.c | 14 +++-- mbsetup/m_virus.c | 12 +++- 5 files changed, 109 insertions(+), 80 deletions(-) diff --git a/mbsetup/m_archive.c b/mbsetup/m_archive.c index 23b90e46..21c38b3a 100644 --- a/mbsetup/m_archive.c +++ b/mbsetup/m_archive.c @@ -780,76 +780,82 @@ char *PickArchive(char *shdr) int archive_doc(FILE *fp, FILE *toc, int page) { - char temp[PATH_MAX]; - FILE *arch, *wp, *ip; - int i, j; + char temp[PATH_MAX]; + FILE *arch, *wp, *ip; + int i, j; - sprintf(temp, "%s/etc/archiver.data", getenv("MBSE_ROOT")); - if ((arch = fopen(temp, "r")) == NULL) - return page; + sprintf(temp, "%s/etc/archiver.data", getenv("MBSE_ROOT")); + if ((arch = fopen(temp, "r")) == NULL) + return page; - page = newpage(fp, page); - addtoc(fp, toc, 3, 0, page, (char *)"Archiver programs"); - i = j = 0; + page = newpage(fp, page); + addtoc(fp, toc, 3, 0, page, (char *)"Archiver programs"); + i = j = 0; - ip = open_webdoc((char *)"archivers.html", (char *)"Archivers", NULL); - fprintf(ip, "Main\n"); - fprintf(ip, "\n"); - close_webdoc(ip); - return page; + i++; + + sprintf(temp, "archiver_%d.html", i); + + if ((wp = open_webdoc(temp, (char *)"Archiver", archiver.comment))) { + fprintf(wp, "Main Back\n"); + fprintf(wp, "

\n"); + fprintf(wp, "\n"); + fprintf(wp, "\n"); + fprintf(wp, "\n"); + add_webtable(wp, (char *)"Short name", archiver.name); + add_webtable(wp, (char *)"Available", getboolean(archiver.available)); + add_webtable(wp, (char *)"Pack files", archiver.farc); + add_webtable(wp, (char *)"Pack mail", archiver.marc); + add_webtable(wp, (char *)"Pack banners", archiver.barc); + add_webtable(wp, (char *)"Test archive", archiver.tarc); + add_webtable(wp, (char *)"Unpack files", archiver.funarc); + add_webtable(wp, (char *)"Unpack mail", archiver.munarc); + add_webtable(wp, (char *)"Get FILE_ID.DIZ", archiver.iunarc); + add_webtable(wp, (char *)"List archive", archiver.varc); + fprintf(wp, "\n"); + fprintf(wp, "
\n"); + close_webdoc(wp); + } + fprintf(ip, "%s%s%s\n", + temp, archiver.name, archiver.comment, getboolean(archiver.available)); + + fprintf(fp, " Comment %s\n", archiver.comment); + fprintf(fp, " Short name %s\n", archiver.name); + fprintf(fp, " Available %s\n", getboolean(archiver.available)); + fprintf(fp, " Pack files %s\n", archiver.farc); + fprintf(fp, " Pack mail %s\n", archiver.marc); + fprintf(fp, " Pack banners %s\n", archiver.barc); + fprintf(fp, " Test archive %s\n", archiver.tarc); + fprintf(fp, " Unpack files %s\n", archiver.funarc); + fprintf(fp, " Unpack mail %s\n", archiver.munarc); + fprintf(fp, " Get FILE_ID.DIZ %s\n", archiver.iunarc); + fprintf(fp, " List archive %s\n", archiver.varc); + fprintf(fp, "\n\n"); + j++; + } + + fclose(arch); + fprintf(ip, "\n"); + fprintf(ip, "\n"); + close_webdoc(ip); + return page; } diff --git a/mbsetup/m_fido.c b/mbsetup/m_fido.c index 90b36295..a2990e07 100644 --- a/mbsetup/m_fido.c +++ b/mbsetup/m_fido.c @@ -545,9 +545,12 @@ int fido_doc(FILE *fp, FILE *toc, int page) fread(&fidonethdr, sizeof(fidonethdr), 1, fido); ip = open_webdoc((char *)"fidonet.html", (char *)"Fidonet networks", NULL); - fprintf(ip, "Main\n"); - fprintf(ip, "