diff --git a/ChangeLog b/ChangeLog
index acf95db9..9eaaeb6e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,20 +6,23 @@ v0.51.3 22-Mar-2003
Removed one setup entry for check for free diskspace, there
were two different values for the same purpose. The removed
one was not used.
+ Moved doc directory from /opt/mbse/doc to /opt/mbse/share/doc.
mbtask:
Signal handler for sigchld set to sig_dfl, test for Fedora.
Removed setup for old diskspace parameter.
mbsetup:
- Added experimental sitedoc creation in html format.
- The advantage of html over the old plain doc is to easy see
- crossreferences using hyperlinks.
- The html files are created in /opt/mbse/doc/html.
+ Added html sitedocs creation. The advantage of html over the
+ old plain doc is to easy see crossreferences using hyperlinks.
+ The html files are created in /opt/mbse/share/doc/html.
The ~/doc/xref.doc and ~/doc/stat.doc are not created anymore,
there was nothing in it yet.
Removed setup for the unused free diskspace parameter.
+ mbfido:
+ The area tags are now created in /opt/mbse/share/doc/tags.
+
v0.51.2 06-Mar-2004 - 22-Mar-2003
diff --git a/Makefile b/Makefile
index 9476285a..84357309 100644
--- a/Makefile
+++ b/Makefile
@@ -55,9 +55,13 @@ install:
@if [ -f ${PREFIX}/etc/sysinfo.data ] ; then \
chmod 0660 ${PREFIX}/etc/sysinfo.data ; \
fi
- @if [ ! -d ${PREFIX}/doc ] ; then \
- mkdir ${PREFIX}/doc ; \
- ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/doc ; \
+ @if [ ! -d ${PREFIX}/share ] ; then \
+ mkdir ${PREFIX}/share ; \
+ ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/share ; \
+ fi
+ @if [ ! -d ${PREFIX}/share/doc ] ; then \
+ mkdir ${PREFIX}/share/doc ; \
+ ${CHOWN} ${OWNER}:${GROUP} ${PREFIX}/share/doc ; \
fi
@if [ ! -d ${PREFIX}/fdb ] ; then \
mkdir ${PREFIX}/fdb ; \
diff --git a/TODO b/TODO
index 14ea372d..e704744b 100644
--- a/TODO
+++ b/TODO
@@ -169,8 +169,3 @@ mbsetup:
N: When a message area is deleted, delete the rulesfile too.
- X: Generate crossreference document:
- Fileechos <=> Groups
- Fileechos <=> Magic processing
- Fileechos <=> Hatch
-
diff --git a/mbfido/maketags.c b/mbfido/maketags.c
index da9243b8..c08f8c0c 100644
--- a/mbfido/maketags.c
+++ b/mbfido/maketags.c
@@ -36,93 +36,90 @@
void MakeTags(void)
{
- FILE *fg, *fd, *td, *ad;
- char *gname, *dname, *tname, *aname;
+ FILE *fg, *fd, *td, *ad;
+ char *gname, *dname, *tname, *aname;
- Syslog('+', "Start making tagfiles");
- gname = calloc(128, sizeof(char));
- dname = calloc(128, sizeof(char));
- tname = calloc(128, sizeof(char));
- aname = calloc(128, sizeof(char));
+ Syslog('+', "Start making tagfiles");
+ gname = calloc(PATH_MAX, sizeof(char));
+ dname = calloc(PATH_MAX, sizeof(char));
+ tname = calloc(PATH_MAX, sizeof(char));
+ aname = calloc(PATH_MAX, sizeof(char));
- sprintf(gname, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
- sprintf(dname, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
+ sprintf(gname, "%s/etc/mgroups.data", getenv("MBSE_ROOT"));
+ sprintf(dname, "%s/etc/mareas.data", getenv("MBSE_ROOT"));
- if (((fg = fopen(gname, "r")) == NULL) ||
- ((fd = fopen(dname, "r")) == NULL)) {
- WriteError("$Can't open data");
- } else {
- fread(&mgrouphdr, sizeof(mgrouphdr), 1, fg);
- fread(&msgshdr, sizeof(msgshdr), 1, fd);
+ if (((fg = fopen(gname, "r")) == NULL) || ((fd = fopen(dname, "r")) == NULL)) {
+ WriteError("$Can't open data");
+ } else {
+ fread(&mgrouphdr, sizeof(mgrouphdr), 1, fg);
+ fread(&msgshdr, sizeof(msgshdr), 1, fd);
- while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) {
- if (mgroup.Active) {
- sprintf(tname, "%s/doc/%s.msgs.tag", getenv("MBSE_ROOT"), mgroup.Name);
- td = fopen(tname, "w");
- sprintf(aname, "%s/doc/%s.msgs.are", getenv("MBSE_ROOT"), mgroup.Name);
- ad = fopen(aname, "w");
- fprintf(ad, "; Mail areas in group %s\n", mgroup.Name);
- fprintf(ad, ";\n");
+ while ((fread(&mgroup, mgrouphdr.recsize, 1, fg)) == 1) {
+ if (mgroup.Active) {
+ sprintf(tname, "%s/share/doc/tags/%s.msgs.tag", getenv("MBSE_ROOT"), mgroup.Name);
+ mkdirs(tname, 0755);
+ td = fopen(tname, "w");
+ sprintf(aname, "%s/share/doc/tags/%s.msgs.are", getenv("MBSE_ROOT"), mgroup.Name);
+ ad = fopen(aname, "w");
+ fprintf(ad, "; Mail areas in group %s\n", mgroup.Name);
+ fprintf(ad, ";\n");
- fseek(fd, msgshdr.hdrsize, SEEK_SET);
- while ((fread(&msgs, msgshdr.recsize, 1, fd)) == 1) {
- if (msgs.Active && strlen(msgs.Tag) &&
- strcmp(mgroup.Name, msgs.Group) == 0) {
- fprintf(ad, "%-35s %s\n", msgs.Tag, msgs.Name);
- fprintf(td, "%s\n", msgs.Tag);
- }
+ fseek(fd, msgshdr.hdrsize, SEEK_SET);
+ while ((fread(&msgs, msgshdr.recsize, 1, fd)) == 1) {
+ if (msgs.Active && strlen(msgs.Tag) && strcmp(mgroup.Name, msgs.Group) == 0) {
+ fprintf(ad, "%-35s %s\n", msgs.Tag, msgs.Name);
+ fprintf(td, "%s\n", msgs.Tag);
+ }
- fseek(fd, msgshdr.syssize, SEEK_CUR);
- }
- fclose(ad);
- fclose(td);
- }
+ fseek(fd, msgshdr.syssize, SEEK_CUR);
}
- fclose(fg);
- fclose(fd);
+ fclose(ad);
+ fclose(td);
+ }
}
+ fclose(fg);
+ fclose(fd);
+ }
- sprintf(gname, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
- sprintf(dname, "%s/etc/tic.data", getenv("MBSE_ROOT"));
+ sprintf(gname, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
+ sprintf(dname, "%s/etc/tic.data", getenv("MBSE_ROOT"));
- if (((fg = fopen(gname, "r")) == NULL) ||
- ((fd = fopen(dname, "r")) == NULL)) {
- WriteError("$Can't open data");
- } else {
- fread(&fgrouphdr, sizeof(fgrouphdr), 1, fg);
- fread(&tichdr, sizeof(tichdr), 1, fd);
+ if (((fg = fopen(gname, "r")) == NULL) || ((fd = fopen(dname, "r")) == NULL)) {
+ WriteError("$Can't open data");
+ } else {
+ fread(&fgrouphdr, sizeof(fgrouphdr), 1, fg);
+ fread(&tichdr, sizeof(tichdr), 1, fd);
- while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) {
- if (fgroup.Active) {
- sprintf(tname, "%s/doc/%s.file.tag", getenv("MBSE_ROOT"), fgroup.Name);
- td = fopen(tname, "w");
- sprintf(aname, "%s/doc/%s.file.are", getenv("MBSE_ROOT"), fgroup.Name);
- ad = fopen(aname, "w");
- fprintf(ad, "; TIC file areas in group %s\n", fgroup.Name);
- fprintf(ad, ";\n");
+ while ((fread(&fgroup, fgrouphdr.recsize, 1, fg)) == 1) {
+ if (fgroup.Active) {
+ sprintf(tname, "%s/share/doc/tags/%s.file.tag", getenv("MBSE_ROOT"), fgroup.Name);
+ td = fopen(tname, "w");
+ sprintf(aname, "%s/share/doc/tags/%s.file.are", getenv("MBSE_ROOT"), fgroup.Name);
+ ad = fopen(aname, "w");
+ fprintf(ad, "; TIC file areas in group %s\n", fgroup.Name);
+ fprintf(ad, ";\n");
- fseek(fd, tichdr.hdrsize, SEEK_SET);
- while ((fread(&tic, tichdr.recsize, 1, fd)) == 1) {
- if (tic.Active && strlen(tic.Name) &&
- strcmp(fgroup.Name, tic.Group) == 0) {
- fprintf(ad, "%-21s %s\n", tic.Name, tic.Comment);
- fprintf(td, "%s\n", tic.Name);
- }
+ fseek(fd, tichdr.hdrsize, SEEK_SET);
+ while ((fread(&tic, tichdr.recsize, 1, fd)) == 1) {
+ if (tic.Active && strlen(tic.Name) && strcmp(fgroup.Name, tic.Group) == 0) {
+ fprintf(ad, "%-21s %s\n", tic.Name, tic.Comment);
+ fprintf(td, "%s\n", tic.Name);
+ }
- fseek(fd, tichdr.syssize, SEEK_CUR);
- }
- fclose(ad);
- fclose(td);
- }
+ fseek(fd, tichdr.syssize, SEEK_CUR);
}
- fclose(fg);
- fclose(fd);
+ fclose(ad);
+ fclose(td);
+ }
}
+ fclose(fg);
+ fclose(fd);
+ }
- free(aname);
- free(tname);
- free(dname);
- free(gname);
+ free(aname);
+ free(tname);
+ free(dname);
+ free(gname);
}
diff --git a/mbsetup/m_archive.c b/mbsetup/m_archive.c
index 093a8156..d774ea63 100644
--- a/mbsetup/m_archive.c
+++ b/mbsetup/m_archive.c
@@ -812,8 +812,8 @@ int archive_doc(FILE *fp, FILE *toc, int page)
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");
+ fprintf(wp, "\n");
fprintf(wp, "\n");
add_webtable(wp, (char *)"Short name", archiver.name);
add_webtable(wp, (char *)"Available", getboolean(archiver.available));
diff --git a/mbsetup/m_hatch.c b/mbsetup/m_hatch.c
index 2484e2d3..3568dbb4 100644
--- a/mbsetup/m_hatch.c
+++ b/mbsetup/m_hatch.c
@@ -594,7 +594,8 @@ int tic_hatch_doc(FILE *fp, FILE *toc, int page)
fprintf(wp, "\n");
fprintf(wp, "\n");
add_webtable(wp, (char *)"File specification", hatch.Spec);
- add_webtable(wp, (char *)"TIC File area", hatch.Name);
+ fprintf(wp, "TIC File area | %s |
\n",
+ hatch.Name, hatch.Name);
add_webtable(wp, (char *)"Replace file", hatch.Replace);
add_webtable(wp, (char *)"Magic filename", hatch.Magic);
add_webtable(wp, (char *)"File description", hatch.Desc);
diff --git a/mbsetup/m_limits.c b/mbsetup/m_limits.c
index 7c459d73..4a2dee95 100644
--- a/mbsetup/m_limits.c
+++ b/mbsetup/m_limits.c
@@ -539,6 +539,7 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
{
char temp[PATH_MAX];
FILE *up, *ip, *no;
+ int nr;
sprintf(temp, "%s/etc/limits.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL)
@@ -584,10 +585,12 @@ int bbs_limits_doc(FILE *fp, FILE *toc, int page)
while ((fread(&LIMIT, LIMIThdr.recsize, 1, no)) == 1) {
fseek(up, usrconfighdr.hdrsize, SEEK_SET);
+ nr = 0;
while (fread(&usrconfig, usrconfighdr.recsize, 1, up) == 1) {
+ nr++;
if (strlen(usrconfig.sUserName) && (usrconfig.Security.level == LIMIT.Security)) {
- fprintf(ip, "%ld | %s | %s |
\n",
- LIMIT.Security, usrconfig.sUserName, usrconfig.sLocation);
+ fprintf(ip, "%ld | %s | %s |
\n",
+ LIMIT.Security, nr, usrconfig.sUserName, usrconfig.sLocation);
}
}
}
diff --git a/mbsetup/m_magic.c b/mbsetup/m_magic.c
index 91e970b9..ced7c150 100644
--- a/mbsetup/m_magic.c
+++ b/mbsetup/m_magic.c
@@ -524,7 +524,8 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
add_webtable(wp, (char *)"Filemask", magic.Mask);
add_webtable(wp, (char *)"Magic type", getmagictype(magic.Attrib));
add_webtable(wp, (char *)"Active", getboolean(magic.Active));
- add_webtable(wp, (char *)"TIC Area", magic.From);
+ fprintf(wp, "TIC Area | %s |
\n",
+ magic.From, magic.From);
fprintf(fp, " Filemask %s\n", magic.Mask);
fprintf(fp, " Type %s\n", getmagictype(magic.Attrib));
fprintf(fp, " Active %s\n", getboolean(magic.Active));
@@ -532,8 +533,9 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
switch (magic.Attrib) {
case MG_ADOPT:
- case MG_MOVE: add_webtable(wp, (char *)"To area", magic.ToArea);
- fprintf(fp, " To area %s\n", magic.ToArea);
+ case MG_MOVE: fprintf(fp, " To area %s\n", magic.ToArea);
+ fprintf(wp, "TIC Area | %s |
\n",
+ magic.ToArea, magic.ToArea);
break;
case MG_EXEC: add_webtable(wp, (char *)"Command", magic.Cmd);
add_webtable(wp, (char *)"Compile nodelist", getboolean(magic.Compile));
diff --git a/mbsetup/m_protocol.c b/mbsetup/m_protocol.c
index 369b83e8..1f303588 100644
--- a/mbsetup/m_protocol.c
+++ b/mbsetup/m_protocol.c
@@ -523,45 +523,76 @@ char *PickProtocol(int nr)
int bbs_prot_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX];
- FILE *no;
- int j;
+ char temp[PATH_MAX];
+ FILE *wp, *ip, *no;
+ int j;
- sprintf(temp, "%s/etc/protocol.data", getenv("MBSE_ROOT"));
- if ((no = fopen(temp, "r")) == NULL)
- return page;
+ sprintf(temp, "%s/etc/protocol.data", getenv("MBSE_ROOT"));
+ if ((no = fopen(temp, "r")) == NULL)
+ return page;
- page = newpage(fp, page);
- addtoc(fp, toc, 8, 5, page, (char *)"BBS Transfer protocols");
- j = 0;
- fprintf(fp, "\n\n");
- fread(&PROThdr, sizeof(PROThdr), 1, no);
+ page = newpage(fp, page);
+ addtoc(fp, toc, 8, 5, page, (char *)"BBS Transfer protocols");
+ j = 0;
+ fprintf(fp, "\n\n");
+ fread(&PROThdr, sizeof(PROThdr), 1, no);
- while ((fread(&PROT, PROThdr.recsize, 1, no)) == 1) {
+ ip = open_webdoc((char *)"protocol.html", (char *)"BBS Transfer Protocols", NULL);
+ fprintf(ip, "Main\n");
+ fprintf(ip, "\n");
+
+ while ((fread(&PROT, PROThdr.recsize, 1, no)) == 1) {
- if (j == 4) {
- page = newpage(fp, page);
- fprintf(fp, "\n");
- j = 0;
- }
-
- fprintf(fp, " Selection key %s\n", PROT.ProtKey);
- fprintf(fp, " Protocol name %s\n", PROT.ProtName);
- fprintf(fp, " Upload command %s\n", PROT.ProtUp);
- fprintf(fp, " Download command %s\n", PROT.ProtDn);
- fprintf(fp, " Available %s\n", getboolean(PROT.Available));
- fprintf(fp, " Batch protocol %s\n", getboolean(PROT.Batch));
- fprintf(fp, " Bidirectional %s\n", getboolean(PROT.Bidir));
- fprintf(fp, " User advice %s\n", PROT.Advice);
- fprintf(fp, " Efficiency %d%%\n", PROT.Efficiency);
- fprintf(fp, " Security level %s\n", get_secstr(PROT.Level));
- fprintf(fp, "\n\n");
-
- j++;
+ if (j == 4) {
+ page = newpage(fp, page);
+ fprintf(fp, "\n");
+ j = 0;
}
- fclose(no);
- return page;
+ sprintf(temp, "protocol_%s.html", PROT.ProtKey);
+ fprintf(ip, "- %s
\n", temp, PROT.ProtName);
+ if ((wp = open_webdoc(temp, (char *)"BBS Transfer Protocol", PROT.ProtName))) {
+ fprintf(wp, "Main Back\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Selection key", PROT.ProtKey);
+ add_webtable(wp, (char *)"Protocol name", PROT.ProtName);
+ add_webtable(wp, (char *)"Upload command", PROT.ProtUp);
+ add_webtable(wp, (char *)"Download command", PROT.ProtDn);
+ add_webtable(wp, (char *)"Available", getboolean(PROT.Available));
+ add_webtable(wp, (char *)"Batch protocol", getboolean(PROT.Batch));
+ add_webtable(wp, (char *)"Bidirectional", getboolean(PROT.Bidir));
+ add_webtable(wp, (char *)"User advice", PROT.Advice);
+ sprintf(temp, "%d%%", PROT.Efficiency);
+ add_webtable(wp, (char *)"Efficiency", temp);
+ web_secflags(wp, (char *)"Security level", PROT.Level);
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
+ }
+
+ fprintf(fp, " Selection key %s\n", PROT.ProtKey);
+ fprintf(fp, " Protocol name %s\n", PROT.ProtName);
+ fprintf(fp, " Upload command %s\n", PROT.ProtUp);
+ fprintf(fp, " Download command %s\n", PROT.ProtDn);
+ fprintf(fp, " Available %s\n", getboolean(PROT.Available));
+ fprintf(fp, " Batch protocol %s\n", getboolean(PROT.Batch));
+ fprintf(fp, " Bidirectional %s\n", getboolean(PROT.Bidir));
+ fprintf(fp, " User advice %s\n", PROT.Advice);
+ fprintf(fp, " Efficiency %d%%\n", PROT.Efficiency);
+ fprintf(fp, " Security level %s\n", get_secstr(PROT.Level));
+ fprintf(fp, "\n\n");
+
+ j++;
+ }
+
+ fprintf(ip, "
\n");
+ close_webdoc(ip);
+
+ fclose(no);
+ return page;
}
diff --git a/mbsetup/m_route.c b/mbsetup/m_route.c
index 1238726e..5a4e87d2 100644
--- a/mbsetup/m_route.c
+++ b/mbsetup/m_route.c
@@ -512,7 +512,7 @@ void InitRoute(void)
int route_doc(FILE *fp, FILE *toc, int page)
{
char *temp;
- FILE *no;
+ FILE *wp, *no;
int j;
temp = calloc(PATH_MAX, sizeof(char));
@@ -529,6 +529,14 @@ int route_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n");
fread(&routehdr, sizeof(routehdr), 1, no);
+ wp = open_webdoc((char *)"route.html", (char *)"Netmail Routing", NULL);
+ fprintf(wp, "Main\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "Route mask | Src username | Action | ");
+ fprintf(wp, "Destination | Dest username | Active |
\n");
+
while ((fread(&route, routehdr.recsize, 1, no)) == 1) {
if (j == 7) {
@@ -536,7 +544,10 @@ int route_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n");
j = 0;
}
-
+
+ fprintf(wp, "%s | %s | %s | %s | %s | %s |
\n",
+ route.mask, route.sname, get_routetype(route.routetype),
+ aka2str(route.dest), route.dname, getboolean(route.Active));
fprintf(fp, " Route mask %s\n", route.mask);
fprintf(fp, " Src username %s\n", route.sname);
fprintf(fp, " Route action %s\n", get_routetype(route.routetype));
@@ -546,7 +557,10 @@ int route_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, "\n\n");
j++;
}
-
+
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
fclose(no);
free(temp);
return page;
diff --git a/mbsetup/m_service.c b/mbsetup/m_service.c
index 7b46866b..d475b2ac 100644
--- a/mbsetup/m_service.c
+++ b/mbsetup/m_service.c
@@ -414,39 +414,48 @@ void InitService(void)
int service_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX];
- FILE *no;
- int j;
+ char temp[PATH_MAX];
+ FILE *wp, *no;
+ int j;
- sprintf(temp, "%s/etc/service.data", getenv("MBSE_ROOT"));
- if ((no = fopen(temp, "r")) == NULL)
- return page;
+ sprintf(temp, "%s/etc/service.data", getenv("MBSE_ROOT"));
+ if ((no = fopen(temp, "r")) == NULL)
+ return page;
- page = newpage(fp, page);
- addtoc(fp, toc, 14, 0, page, (char *)"Service manager");
- j = 0;
+ page = newpage(fp, page);
+ addtoc(fp, toc, 14, 0, page, (char *)"Service manager");
+ j = 0;
- fprintf(fp, "\n");
- fprintf(fp, " Service Action Active\n");
- fprintf(fp, " --------------- -------- ------\n");
- fread(&servhdr, sizeof(servhdr), 1, no);
+ fprintf(fp, "\n");
+ fprintf(fp, " Service Action Active\n");
+ fprintf(fp, " --------------- -------- ------\n");
+ fread(&servhdr, sizeof(servhdr), 1, no);
- while ((fread(&servrec, servhdr.recsize, 1, no)) == 1) {
+ wp = open_webdoc((char *)"service.html", (char *)"Mail Service Manager", NULL);
+ fprintf(wp, "Main\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "Service | Action | Active |
\n");
- if (j == 50) {
- page = newpage(fp, page);
- fprintf(fp, "\n");
- fprintf(fp, " Service Action Active\n");
- fprintf(fp, " --------------- -------- ------\n");
- j = 0;
- }
+ while ((fread(&servrec, servhdr.recsize, 1, no)) == 1) {
- fprintf(fp, " %-15s %-8s %s\n", servrec.Service, getservice(servrec.Action), getboolean(servrec.Active));
- j++;
+ if (j == 50) {
+ page = newpage(fp, page);
+ fprintf(fp, "\n");
+ fprintf(fp, " Service Action Active\n");
+ fprintf(fp, " --------------- -------- ------\n");
+ j = 0;
}
- fclose(no);
- return page;
+ fprintf(wp, "%s | %s | %s |
\n",
+ servrec.Service, getservice(servrec.Action), getboolean(servrec.Active));
+ fprintf(fp, " %-15s %-8s %s\n", servrec.Service, getservice(servrec.Action), getboolean(servrec.Active));
+ j++;
+ }
+
+ fclose(no);
+ return page;
}
diff --git a/mbsetup/m_task.c b/mbsetup/m_task.c
index df9705f6..2401e807 100644
--- a/mbsetup/m_task.c
+++ b/mbsetup/m_task.c
@@ -184,40 +184,70 @@ void task_menu(void)
int task_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX];
- FILE *no;
-
- sprintf(temp, "%s/etc/task.data", getenv("MBSE_ROOT"));
- if ((no = fopen(temp, "r")) == NULL)
- return page;
- fread(&TCFG, sizeof(TCFG), 1, no);
- fclose(no);
-
- page = newpage(fp, page);
- addtoc(fp, toc, 16, 0, page, (char *)"Task manager");
-
- fprintf(fp, "\n");
- fprintf(fp, " Command on mailout %s\n", TCFG.cmd_mailout);
- fprintf(fp, " Command on mailin %s\n", TCFG.cmd_mailin);
- fprintf(fp, " Command on newnews %s\n", TCFG.cmd_newnews);
- fprintf(fp, " Command on mbindex 1 %s\n", TCFG.cmd_mbindex1);
- fprintf(fp, " Command on mbindex 2 %s\n", TCFG.cmd_mbindex2);
- fprintf(fp, " Command on mbindex 3 %s\n", TCFG.cmd_mbindex3);
- fprintf(fp, " Command on msglink %s\n", TCFG.cmd_msglink);
- fprintf(fp, " Command on reqindex %s\n\n", TCFG.cmd_reqindex);
-
- fprintf(fp, " Zone Mail Hour start %s\n", TCFG.zmh_start);
- fprintf(fp, " Zone Mail Hour end %s\n\n", TCFG.zmh_end);
-
- fprintf(fp, " ISP connect command %s\n", TCFG.isp_connect);
- fprintf(fp, " ISP hangup command %s\n", TCFG.isp_hangup);
- fprintf(fp, " ISP ping host 1 %s\n", TCFG.isp_ping1);
- fprintf(fp, " ISP ping host 2 %s\n", TCFG.isp_ping2);
-
- fprintf(fp, " Maximum system load %0.2f\n", TCFG.maxload);
- fprintf(fp, " Max TCP/IP connections %d\n", TCFG.max_tcp);
+ char temp[PATH_MAX];
+ FILE *wp, *no;
+ sprintf(temp, "%s/etc/task.data", getenv("MBSE_ROOT"));
+ if ((no = fopen(temp, "r")) == NULL)
return page;
+ fread(&TCFG, sizeof(TCFG), 1, no);
+ fclose(no);
+
+ wp = open_webdoc((char *)"task.html", (char *)"Task Manager", NULL);
+ fprintf(wp, "Main\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Command on mailout", TCFG.cmd_mailout);
+ add_webtable(wp, (char *)"Command on mailin", TCFG.cmd_mailin);
+ add_webtable(wp, (char *)"Command on newnews", TCFG.cmd_newnews);
+ add_webtable(wp, (char *)"Command on mbindex 1", TCFG.cmd_mbindex1);
+ add_webtable(wp, (char *)"Command on mbindex 2", TCFG.cmd_mbindex1);
+ add_webtable(wp, (char *)"Command on mbindex 3", TCFG.cmd_mbindex2);
+ add_webtable(wp, (char *)"Command on msglink", TCFG.cmd_msglink);
+ add_webtable(wp, (char *)"Command on reqindex", TCFG.cmd_reqindex);
+ fprintf(wp, " |
\n");
+ add_webtable(wp, (char *)"Zone Mail Hour start", TCFG.zmh_start);
+ add_webtable(wp, (char *)"Zone Mail Hour end", TCFG.zmh_end);
+ fprintf(wp, " |
\n");
+ add_webtable(wp, (char *)"ISP connect command", TCFG.isp_connect);
+ add_webtable(wp, (char *)"ISP hangup command", TCFG.isp_hangup);
+ add_webtable(wp, (char *)"ISP ping host 1", TCFG.isp_ping1);
+ add_webtable(wp, (char *)"ISP ping host 2", TCFG.isp_ping2);
+ fprintf(wp, " |
\n");
+ sprintf(temp, "%0.2f", TCFG.maxload);
+ add_webtable(wp, (char *)"Maximum system load", temp);
+ add_webdigit(wp, (char *)"Max TCP/IP connections", TCFG.max_tcp);
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
+
+ page = newpage(fp, page);
+ addtoc(fp, toc, 16, 0, page, (char *)"Task manager");
+
+ fprintf(fp, "\n");
+ fprintf(fp, " Command on mailout %s\n", TCFG.cmd_mailout);
+ fprintf(fp, " Command on mailin %s\n", TCFG.cmd_mailin);
+ fprintf(fp, " Command on newnews %s\n", TCFG.cmd_newnews);
+ fprintf(fp, " Command on mbindex 1 %s\n", TCFG.cmd_mbindex1);
+ fprintf(fp, " Command on mbindex 2 %s\n", TCFG.cmd_mbindex2);
+ fprintf(fp, " Command on mbindex 3 %s\n", TCFG.cmd_mbindex3);
+ fprintf(fp, " Command on msglink %s\n", TCFG.cmd_msglink);
+ fprintf(fp, " Command on reqindex %s\n\n", TCFG.cmd_reqindex);
+
+ fprintf(fp, " Zone Mail Hour start %s\n", TCFG.zmh_start);
+ fprintf(fp, " Zone Mail Hour end %s\n\n", TCFG.zmh_end);
+
+ fprintf(fp, " ISP connect command %s\n", TCFG.isp_connect);
+ fprintf(fp, " ISP hangup command %s\n", TCFG.isp_hangup);
+ fprintf(fp, " ISP ping host 1 %s\n", TCFG.isp_ping1);
+ fprintf(fp, " ISP ping host 2 %s\n", TCFG.isp_ping2);
+
+ fprintf(fp, " Maximum system load %0.2f\n", TCFG.maxload);
+ fprintf(fp, " Max TCP/IP connections %d\n", TCFG.max_tcp);
+
+ return page;
}
diff --git a/mbsetup/m_ticarea.c b/mbsetup/m_ticarea.c
index 0ae4eb8f..35eb4e02 100644
--- a/mbsetup/m_ticarea.c
+++ b/mbsetup/m_ticarea.c
@@ -1257,73 +1257,230 @@ int NodeInTic(fidoaddr A)
int tic_areas_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX], status[4];
- FILE *no;
- int i, systems, First = TRUE;
- sysconnect System;
+ char temp[PATH_MAX], status[4];
+ FILE *ti, *wp, *ip, *no;
+ int refs, i, k, nr, systems, First = TRUE;
+ sysconnect System;
- sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT"));
- if ((no = fopen(temp, "r")) == NULL)
- return page;
+ sprintf(temp, "%s/etc/tic.data", getenv("MBSE_ROOT"));
+ if ((no = fopen(temp, "r")) == NULL)
+ return page;
- fread(&tichdr, sizeof(tichdr), 1, no);
- fseek(no, 0, SEEK_SET);
- fread(&tichdr, tichdr.hdrsize, 1, no);
- systems = tichdr.syssize / sizeof(sysconnect);
+ fread(&tichdr, sizeof(tichdr), 1, no);
+ fseek(no, 0, SEEK_SET);
+ fread(&tichdr, tichdr.hdrsize, 1, no);
+ systems = tichdr.syssize / sizeof(sysconnect);
- while ((fread(&tic, tichdr.recsize, 1, no)) == 1) {
+ ip = open_webdoc((char *)"ticareas.html", (char *)"TIC Areas", NULL);
+ fprintf(ip, "Main\n");
+ fprintf(ip, "\n");
+
+ while ((fread(&tic, tichdr.recsize, 1, no)) == 1) {
- page = newpage(fp, page);
+ page = newpage(fp, page);
- if (First) {
- addtoc(fp, toc, 10, 2, page, (char *)"File processing areas");
- First = FALSE;
- fprintf(fp, "\n");
- } else
- fprintf(fp, "\n\n");
+ if (First) {
+ addtoc(fp, toc, 10, 2, page, (char *)"File processing areas");
+ First = FALSE;
+ fprintf(fp, "\n");
+ } else
+ fprintf(fp, "\n\n");
- fprintf(fp, " Area tag %s\n", tic.Name);
- fprintf(fp, " Active %s\n", getboolean(tic.Active));
- fprintf(fp, " Comment %s\n", tic.Comment);
- fprintf(fp, " BBS area %ld\n", tic.FileArea);
- fprintf(fp, " Message %s\n", tic.Message);
- fprintf(fp, " Group %s\n", tic.Group);
- fprintf(fp, " Keep Numbe %d\n", tic.KeepLatest);
- fprintf(fp, " Fido Aka %s\n", aka2str(tic.Aka));
- fprintf(fp, " Convert to %s\n", tic.Convert);
- fprintf(fp, " Convert all %s\n", getboolean(tic.ConvertAll));
- fprintf(fp, " Banner file %s\n", tic.Banner);
- fprintf(fp, " Security %s\n", getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
- fprintf(fp, " Replace ok. %s\n", getboolean(tic.Replace));
- fprintf(fp, " Dupe check %s\n", getboolean(tic.DupCheck));
- fprintf(fp, " Secure %s\n", getboolean(tic.Secure));
- fprintf(fp, " Touch %s\n", getboolean(tic.Touch));
- fprintf(fp, " Virus scan %s\n", getboolean(tic.VirScan));
- fprintf(fp, " Announce %s\n", getboolean(tic.Announce));
- fprintf(fp, " Upd. magic %s\n", getboolean(tic.UpdMagic));
- fprintf(fp, " FILE_ID.DIZ %s\n", getboolean(tic.FileId));
- fprintf(fp, " Mandatory %s\n", getboolean(tic.Mandat));
- fprintf(fp, " Upl. discon %s\n", getboolean(tic.UplDiscon));
- fprintf(fp, " Notified %s\n\n", getboolean(tic.Notified));
-
- for (i = 0; i < systems; i++) {
- fread(&System, sizeof(sysconnect), 1, no);
- if (System.aka.zone) {
- memset(&status, 0, 4);
- memset(&status, '-', 3);
- if (System.sendto)
- status[0] = 'S';
- if (System.receivefrom)
- status[1] = 'R';
- if (System.pause)
- status[2] = 'P';
- fprintf(fp, " Link %2d %s %s\n", i+1, status, aka2str(System.aka));
- }
+ sprintf(temp, "ticarea_%s.html", tic.Name);
+ fprintf(ip, " - Area %s %s
\n", temp, tic.Name, tic.Comment);
+ if ((wp = open_webdoc(temp, (char *)"TIC Area", tic.Comment))) {
+ fprintf(wp, "Main Back\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Area tag", tic.Name);
+ add_webtable(wp, (char *)"Active", getboolean(tic.Active));
+ add_webtable(wp, (char *)"Comment", tic.Comment);
+ sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
+ if ((ti = fopen(temp, "r"))) {
+ fread(&areahdr, sizeof(areahdr), 1, ti);
+ fseek(ti, areahdr.hdrsize + (areahdr.recsize * (tic.FileArea -1)), SEEK_SET);
+ if (fread(&area, areahdr.recsize, 1, ti) == 1) {
+ fprintf(wp, "BBS area | %ld %s |
\n",
+ tic.FileArea, tic.FileArea, area.Name);
}
+ fclose(ti);
+ }
+ add_webtable(wp, (char *)"Message", tic.Message);
+ fprintf(wp, "TIC file group | %s |
\n",
+ tic.Group, tic.Group);
+ add_webdigit(wp, (char *)"Keep Number", tic.KeepLatest);
+ add_webtable(wp, (char *)"Fido Aka", aka2str(tic.Aka));
+ add_webtable(wp, (char *)"Convert to", tic.Convert);
+ add_webtable(wp, (char *)"Convert all", getboolean(tic.ConvertAll));
+ add_webtable(wp, (char *)"Banner file", tic.Banner);
+ add_webtable(wp, (char *)"Security", getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
+ add_webtable(wp, (char *)"Allow replace", getboolean(tic.Replace));
+ add_webtable(wp, (char *)"Dupe check", getboolean(tic.DupCheck));
+ add_webtable(wp, (char *)"Secure", getboolean(tic.Secure));
+ add_webtable(wp, (char *)"Touch filedate", getboolean(tic.Touch));
+ add_webtable(wp, (char *)"Virus scan", getboolean(tic.VirScan));
+ add_webtable(wp, (char *)"Announce files", getboolean(tic.Announce));
+ add_webtable(wp, (char *)"Update magic name", getboolean(tic.UpdMagic));
+ add_webtable(wp, (char *)"Get FILE_ID.DIZ", getboolean(tic.FileId));
+ add_webtable(wp, (char *)"Mandatory area", getboolean(tic.Mandat));
+ add_webtable(wp, (char *)"Uplink disconnect", getboolean(tic.UplDiscon));
+ add_webtable(wp, (char *)"Notified uplink", getboolean(tic.Notified));
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "Area Statistics
\n");
+ add_statcnt(wp, (char *)"processed files", tic.Files);
+ add_statcnt(wp, (char *)"processed KBytes", tic.KBytes);
+ fprintf(wp, "
\n");
+ fprintf(wp, "Connected Systems
\n");
+ }
+
+ fprintf(fp, " Area tag %s\n", tic.Name);
+ fprintf(fp, " Active %s\n", getboolean(tic.Active));
+ fprintf(fp, " Comment %s\n", tic.Comment);
+ fprintf(fp, " BBS area %ld\n", tic.FileArea);
+ fprintf(fp, " Message %s\n", tic.Message);
+ fprintf(fp, " Group %s\n", tic.Group);
+ fprintf(fp, " Keep Numbe %d\n", tic.KeepLatest);
+ fprintf(fp, " Fido Aka %s\n", aka2str(tic.Aka));
+ fprintf(fp, " Convert to %s\n", tic.Convert);
+ fprintf(fp, " Convert all %s\n", getboolean(tic.ConvertAll));
+ fprintf(fp, " Banner file %s\n", tic.Banner);
+ fprintf(fp, " Security %s\n", getflag(tic.LinkSec.flags, tic.LinkSec.notflags));
+ fprintf(fp, " Replace ok. %s\n", getboolean(tic.Replace));
+ fprintf(fp, " Dupe check %s\n", getboolean(tic.DupCheck));
+ fprintf(fp, " Secure %s\n", getboolean(tic.Secure));
+ fprintf(fp, " Touch %s\n", getboolean(tic.Touch));
+ fprintf(fp, " Virus scan %s\n", getboolean(tic.VirScan));
+ fprintf(fp, " Announce %s\n", getboolean(tic.Announce));
+ fprintf(fp, " Upd. magic %s\n", getboolean(tic.UpdMagic));
+ fprintf(fp, " FILE_ID.DIZ %s\n", getboolean(tic.FileId));
+ fprintf(fp, " Mandatory %s\n", getboolean(tic.Mandat));
+ fprintf(fp, " Upl. discon %s\n", getboolean(tic.UplDiscon));
+ fprintf(fp, " Notified %s\n\n", getboolean(tic.Notified));
+
+ refs = 0;
+ for (i = 0; i < systems; i++) {
+ fread(&System, sizeof(sysconnect), 1, no);
+ if (System.aka.zone) {
+ if ((refs == 0) && (wp != NULL)) {
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ }
+ refs++;
+ memset(&status, 0, 4);
+ memset(&status, '-', 3);
+ if (System.sendto)
+ status[0] = 'S';
+ if (System.receivefrom)
+ status[1] = 'R';
+ if (System.pause)
+ status[2] = 'P';
+ fprintf(fp, " Link %2d %s %s\n", i+1, status, aka2str(System.aka));
+ if (wp != NULL) {
+ sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT"));
+ if ((ti = fopen(temp, "r"))) {
+ fread(&nodeshdr, sizeof(nodeshdr), 1, ti);
+ fseek(ti, 0, SEEK_SET);
+ fread(&nodeshdr, nodeshdr.hdrsize, 1, ti);
+ while ((fread(&nodes, nodeshdr.recsize, 1, ti)) == 1) {
+ fseek(ti, nodeshdr.filegrp + nodeshdr.mailgrp, SEEK_CUR);
+ for (k = 0; k < 20; k++) {
+ if ((nodes.Aka[k].zone == System.aka.zone) &&
+ (nodes.Aka[k].net == System.aka.net ) &&
+ (nodes.Aka[k].node == System.aka.node) &&
+ (nodes.Aka[k].point == System.aka.point) &&
+ (strcmp(nodes.Aka[k].domain, System.aka.domain) == 0)) {
+ fprintf(wp, "%s | %s | %s |
\n",
+ nodes.Aka[0].zone, nodes.Aka[0].net, nodes.Aka[0].node, nodes.Aka[0].point,
+ nodes.Aka[0].domain, aka2str(nodes.Aka[0]), status, nodes.Sysop);
+ }
+ }
+ }
+ fclose(ti);
+ }
+ }
+ }
}
- fclose(no);
- return page;
+ if (wp != NULL) {
+ if (refs == 0)
+ fprintf(wp, "No Nodes References\n");
+ else {
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ }
+
+ fprintf(wp, "
\n");
+ fprintf(wp, "Hatch References
\n");
+ sprintf(temp, "%s/etc/hatch.data", getenv("MBSE_ROOT"));
+ nr = refs = 0;
+ if ((ti = fopen(temp, "r"))) {
+ fread(&hatchhdr, sizeof(hatchhdr), 1, ti);
+ while ((fread(&hatch, hatchhdr.recsize, 1, ti)) == 1) {
+ nr++;
+ if (hatch.Active && (strcmp(tic.Name, hatch.Name) == 0)) {
+ if (refs == 0) {
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ }
+ refs++;
+ sprintf(temp, "hatch_%d.html", nr);
+ fprintf(wp, "Hatch %d | %s |
\n",
+ temp, nr, hatch.Spec);
+ }
+ }
+ fclose(ti);
+ }
+ if (refs == 0)
+ fprintf(wp, "No Hatch References\n");
+ else {
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ }
+
+ fprintf(wp, "
\n");
+ fprintf(wp, "Magic References
\n");
+ sprintf(temp, "%s/etc/magic.data", getenv("MBSE_ROOT"));
+ nr = refs = 0;
+ if ((ti = fopen(temp, "r"))) {
+ fread(&magichdr, sizeof(magichdr), 1, ti);
+ while ((fread(&magic, magichdr.recsize, 1, ti)) == 1) {
+ nr++;
+ if (magic.Active && (strcmp(tic.Name, magic.From) == 0)) {
+ if (refs == 0) {
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ }
+ refs++;
+ sprintf(temp, "magic_%d.html", nr);
+ fprintf(wp, "Magic %d | (%s) %s |
\n",
+ temp, nr, getmagictype(magic.Attrib), magic.Mask);
+ }
+ }
+ fclose(ti);
+ }
+ if (refs == 0)
+ fprintf(wp, "No Magic References\n");
+ else {
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ }
+
+ close_webdoc(wp);
+ }
+ }
+
+ fprintf(ip, "
\n");
+ close_webdoc(ip);
+
+ fclose(no);
+ return page;
}
diff --git a/mbsetup/m_tty.c b/mbsetup/m_tty.c
index 858aa231..623bcafd 100644
--- a/mbsetup/m_tty.c
+++ b/mbsetup/m_tty.c
@@ -524,47 +524,87 @@ void InitTtyinfo(void)
int tty_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX];
- FILE *tty;
- int j;
+ char temp[PATH_MAX];
+ FILE *wp, *ip, *tty;
+ int j;
- sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
- if ((tty = fopen(temp, "r")) == NULL)
- return page;
+ sprintf(temp, "%s/etc/ttyinfo.data", getenv("MBSE_ROOT"));
+ if ((tty = fopen(temp, "r")) == NULL)
+ return page;
- page = newpage(fp, page);
- addtoc(fp, toc, 6, 0, page, (char *)"TTY lines information");
- j = 0;
+ page = newpage(fp, page);
+ addtoc(fp, toc, 6, 0, page, (char *)"TTY lines information");
+ j = 0;
- fprintf(fp, "\n\n");
- fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty);
+ fprintf(fp, "\n\n");
+ fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty);
- while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) {
- if (j == 3) {
- page = newpage(fp, page);
- fprintf(fp, "\n");
- j = 0;
- }
-
- fprintf(fp, " TTY name %s\n", ttyinfo.comment);
- fprintf(fp, " Device name %s\n", ttyinfo.tty);
- fprintf(fp, " Phone or DNS %s\n", ttyinfo.phone);
- fprintf(fp, " Line speed %s\n", ttyinfo.speed);
- fprintf(fp, " Fido flags %s\n", ttyinfo.flags);
- fprintf(fp, " Equipment %s\n", getlinetype(ttyinfo.type));
- fprintf(fp, " Available %s\n", getboolean(ttyinfo.available));
- fprintf(fp, " Auth. log %s\n", getboolean(ttyinfo.authlog));
- fprintf(fp, " Honor ZMH %s\n", getboolean(ttyinfo.honor_zmh));
- fprintf(fp, " Callout %s\n", getboolean(ttyinfo.callout));
- fprintf(fp, " Modem type %s\n", ttyinfo.modem);
- fprintf(fp, " Locked speed %ld\n", ttyinfo.portspeed);
- fprintf(fp, " EMSI name %s\n", ttyinfo.name);
- fprintf(fp, "\n\n");
- j++;
+ ip = open_webdoc((char *)"ttyinfo.html", (char *)"TTY Lines", NULL);
+ fprintf(ip, "Main\n");
+ fprintf(ip, "\n");
+
+ while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) {
+ if (j == 3) {
+ page = newpage(fp, page);
+ fprintf(fp, "\n");
+ j = 0;
}
- fclose(tty);
- return page;
+ sprintf(temp, "ttyinfo_%s.html", ttyinfo.tty);
+ fprintf(ip, "- %s
\n", temp, ttyinfo.comment);
+ if ((wp = open_webdoc(temp, (char *)"TTY Line", ttyinfo.comment))) {
+ /*
+ * There are devices like pts/1, this will create a subdir for the
+ * pts lines, we need a different return path.
+ */
+ if (strchr(ttyinfo.tty, '/'))
+ fprintf(wp, "Main Back\n");
+ else
+ fprintf(wp, "Main Back\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"TTY name", ttyinfo.comment);
+ add_webtable(wp, (char *)"Device name", ttyinfo.tty);
+ add_webtable(wp, (char *)"Phone or DNS", ttyinfo.phone);
+ add_webtable(wp, (char *)"Line speed", ttyinfo.speed);
+ add_webtable(wp, (char *)"Fido flags", ttyinfo.flags);
+ add_webtable(wp, (char *)"Equipment", getlinetype(ttyinfo.type));
+ add_webtable(wp, (char *)"Available", getboolean(ttyinfo.available));
+ add_webtable(wp, (char *)"Auth. log", getboolean(ttyinfo.authlog));
+ add_webtable(wp, (char *)"Honor ZMH", getboolean(ttyinfo.honor_zmh));
+ add_webtable(wp, (char *)"Callout", getboolean(ttyinfo.callout));
+ add_webtable(wp, (char *)"Modem type", ttyinfo.modem);
+ add_webdigit(wp, (char *)"Locked speed", ttyinfo.portspeed);
+ add_webtable(wp, (char *)"EMSI name", ttyinfo.name);
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
+ }
+
+ fprintf(fp, " TTY name %s\n", ttyinfo.comment);
+ fprintf(fp, " Device name %s\n", ttyinfo.tty);
+ fprintf(fp, " Phone or DNS %s\n", ttyinfo.phone);
+ fprintf(fp, " Line speed %s\n", ttyinfo.speed);
+ fprintf(fp, " Fido flags %s\n", ttyinfo.flags);
+ fprintf(fp, " Equipment %s\n", getlinetype(ttyinfo.type));
+ fprintf(fp, " Available %s\n", getboolean(ttyinfo.available));
+ fprintf(fp, " Auth. log %s\n", getboolean(ttyinfo.authlog));
+ fprintf(fp, " Honor ZMH %s\n", getboolean(ttyinfo.honor_zmh));
+ fprintf(fp, " Callout %s\n", getboolean(ttyinfo.callout));
+ fprintf(fp, " Modem type %s\n", ttyinfo.modem);
+ fprintf(fp, " Locked speed %ld\n", ttyinfo.portspeed);
+ fprintf(fp, " EMSI name %s\n", ttyinfo.name);
+ fprintf(fp, "\n\n");
+ j++;
+ }
+
+ fprintf(ip, "
\n");
+ close_webdoc(ip);
+
+ fclose(tty);
+ return page;
}
diff --git a/mbsetup/m_users.c b/mbsetup/m_users.c
index 4040468e..683b8a94 100644
--- a/mbsetup/m_users.c
+++ b/mbsetup/m_users.c
@@ -662,3 +662,98 @@ void InitUsers(void)
}
+
+void users_doc(void)
+{
+ char temp[PATH_MAX];
+ FILE *wp, *ip, *fp;
+ int nr = 0;
+
+ sprintf(temp, "%s/etc/users.data", getenv("MBSE_ROOT"));
+ if ((fp = fopen(temp, "r")) == NULL)
+ return;
+
+ fread(&usrconfighdr, sizeof(usrconfighdr), 1, fp);
+
+ ip = open_webdoc((char *)"users.html", (char *)"BBS Users", NULL);
+ fprintf(ip, "Main\n");
+ fprintf(ip, "\n");
+
+ while (fread(&usrconfig, usrconfighdr.recsize, 1, fp) == 1) {
+ nr++;
+ sprintf(temp, "user_%d.html", nr);
+ fprintf(ip, "- %s
\n", temp, usrconfig.sUserName);
+ if ((wp = open_webdoc(temp, (char *)"BBS User", usrconfig.sUserName))) {
+ fprintf(wp, "Main Back\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Fidonet Name", usrconfig.sUserName);
+ add_webtable(wp, (char *)"Unix Name", usrconfig.Name);
+ web_secflags(wp, (char *)"Security level", usrconfig.Security);
+ add_webtable(wp, (char *)"Expiry date", usrconfig.sExpiryDate);
+ web_secflags(wp, (char *)"Expiry security level", usrconfig.ExpirySec);
+ add_webtable(wp, (char *)"First login date", ctime(&usrconfig.tFirstLoginDate));
+ add_webtable(wp, (char *)"Last login date", ctime(&usrconfig.tLastLoginDate));
+ add_webtable(wp, (char *)"Last password change", ctime(&usrconfig.tLastPwdChange));
+ add_webdigit(wp, (char *)"Credit", usrconfig.Credit);
+ add_webtable(wp, (char *)"Hidden from lists", getboolean(usrconfig.Hidden));
+ add_webtable(wp, (char *)"Never delete", getboolean(usrconfig.NeverDelete));
+ add_webtable(wp, (char *)"Comment", usrconfig.sComment);
+ add_webtable(wp, (char *)"Locked out", getboolean(usrconfig.LockedOut));
+ add_webtable(wp, (char *)"Guest user", getboolean(usrconfig.Guest));
+ add_webtable(wp, (char *)"OLR Extended info", getboolean(usrconfig.OL_ExtInfo));
+ add_webtable(wp, (char *)"Has e-mail", getboolean(usrconfig.Email));
+ add_webdigit(wp, (char *)"Total calls", usrconfig.iTotalCalls);
+ add_webdigit(wp, (char *)"total downloads", usrconfig.Downloads);
+ add_webdigit(wp, (char *)"Downloaded KBytes", usrconfig.DownloadK);
+ add_webdigit(wp, (char *)"Total uploads", usrconfig.Uploads);
+ add_webdigit(wp, (char *)"Uploaded KBytes", usrconfig.UploadK);
+ add_webdigit(wp, (char *)"Posted messages", usrconfig.iPosted);
+ add_webdigit(wp, (char *)"Minutes left today", usrconfig.iTimeLeft);
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "User personal settings
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Handle", usrconfig.sHandle);
+ add_webtable(wp, (char *)"Location", usrconfig.sLocation);
+ add_webtable(wp, (char *)"Address", usrconfig.address[0]);
+ add_webtable(wp, (char *)"Address", usrconfig.address[1]);
+ add_webtable(wp, (char *)"Address", usrconfig.address[2]);
+ add_webtable(wp, (char *)"Voice phone", usrconfig.sVoicePhone);
+ add_webtable(wp, (char *)"Data phone", usrconfig.sDataPhone);
+ add_webtable(wp, (char *)"Date of birth", usrconfig.sDateOfBirth);
+ add_webtable(wp, (char *)"Password", usrconfig.Password);
+ add_webtable(wp, (char *)"Sex", usrconfig.sSex);
+ add_webtable(wp, (char *)"Protocol", usrconfig.sProtocol);
+ add_webtable(wp, (char *)"Archiver", usrconfig.Archiver);
+ add_webtable(wp, (char *)"Character set", getchrs(usrconfig.Charset));
+ add_webdigit(wp, (char *)"Screen length", usrconfig.iScreenLen);
+ sprintf(temp, "%c", usrconfig.iLanguage);
+ add_webtable(wp, (char *)"Language", temp);
+ add_webtable(wp, (char *)"Use hotkeys", getboolean(usrconfig.HotKeys));
+ add_webtable(wp, (char *)"ANSI mode", getboolean(usrconfig.GraphMode));
+ add_webtable(wp, (char *)"Do not disturb", getboolean(usrconfig.DoNotDisturb));
+ add_webtable(wp, (char *)"Clear Screen", getboolean(usrconfig.Cls));
+ add_webtable(wp, (char *)"More prompt", getboolean(usrconfig.More));
+ add_webtable(wp, (char *)"Message editor", getmsgeditor(usrconfig.MsgEditor));
+ add_webtable(wp, (char *)"Scan new mail", getboolean(usrconfig.MailScan));
+ add_webtable(wp, (char *)"Display news", getboolean(usrconfig.ieNEWS));
+ add_webtable(wp, (char *)"Display newfiles", getboolean(usrconfig.ieFILE));
+ add_webtable(wp, (char *)"Emacs editor keys", getboolean(usrconfig.FSemacs));
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
+ }
+ }
+
+ fprintf(ip, "
\n");
+ close_webdoc(ip);
+
+ fclose(fp);
+}
+
+
diff --git a/mbsetup/m_users.h b/mbsetup/m_users.h
index afc7e2b1..a9980382 100644
--- a/mbsetup/m_users.h
+++ b/mbsetup/m_users.h
@@ -1,12 +1,11 @@
-/* m_users.h */
-
#ifndef _USERS_H
#define _USERS_H
+/* $Id$ */
int CountUsers(void);
void EditUsers(void);
void InitUsers(void);
+void users_doc(void);
#endif
-
diff --git a/mbsetup/m_virus.c b/mbsetup/m_virus.c
index cdb2c5bc..9a132be7 100644
--- a/mbsetup/m_virus.c
+++ b/mbsetup/m_virus.c
@@ -413,39 +413,65 @@ void InitVirus(void)
int virus_doc(FILE *fp, FILE *toc, int page)
{
- char temp[PATH_MAX];
- FILE *vir;
- int j;
+ char temp[PATH_MAX];
+ FILE *wp, *ip, *vir;
+ int nr = 0, j;
- sprintf(temp, "%s/etc/virscan.data", getenv("MBSE_ROOT"));
- if ((vir = fopen(temp, "r")) == NULL)
- return page;
+ sprintf(temp, "%s/etc/virscan.data", getenv("MBSE_ROOT"));
+ if ((vir = fopen(temp, "r")) == NULL)
+ return page;
- page = newpage(fp, page);
- addtoc(fp, toc, 4, 0, page, (char *)"Virus scanners");
- j = 0;
- fprintf(fp, "\n\n");
- fread(&virscanhdr, sizeof(virscanhdr), 1, vir);
+ page = newpage(fp, page);
+ addtoc(fp, toc, 4, 0, page, (char *)"Virus scanners");
+ j = 0;
+ fprintf(fp, "\n\n");
+ fread(&virscanhdr, sizeof(virscanhdr), 1, vir);
- while ((fread(&virscan, virscanhdr.recsize, 1, vir)) == 1) {
+ ip = open_webdoc((char *)"virscan.html", (char *)"Virus Scanners", NULL);
+ fprintf(ip, "Main\n");
+ fprintf(ip, "\n");
+
+ while ((fread(&virscan, virscanhdr.recsize, 1, vir)) == 1) {
- if (j == 5) {
- page = newpage(fp, page);
- fprintf(fp, "\n");
- j = 0;
- }
-
- fprintf(fp, " Scanner name %s\n", virscan.comment);
- fprintf(fp, " Command line %s\n", virscan.scanner);
- fprintf(fp, " Options %s\n", virscan.options);
- fprintf(fp, " Available %s\n", getboolean(virscan.available));
- fprintf(fp, " Errorlevel OK %d\n", virscan.error);
- fprintf(fp, "\n\n\n");
- j++;
+ if (j == 5) {
+ page = newpage(fp, page);
+ fprintf(fp, "\n");
+ j = 0;
}
- fclose(vir);
- return page;
+ nr++;
+ sprintf(temp, "virscan_%d.html", nr);
+ fprintf(ip, "- %s
\n", temp, virscan.comment);
+ if ((wp = open_webdoc(temp, (char *)"Virus Scanner", virscan.comment))) {
+ fprintf(wp, "Main Back\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ fprintf(wp, "\n");
+ fprintf(wp, "\n");
+ add_webtable(wp, (char *)"Scanner name", virscan.comment);
+ add_webtable(wp, (char *)"Command line", virscan.scanner);
+ add_webtable(wp, (char *)"Options", virscan.options);
+ add_webtable(wp, (char *)"Available", getboolean(virscan.available));
+ add_webdigit(wp, (char *)"Errorlevel OK", virscan.error);
+ fprintf(wp, "\n");
+ fprintf(wp, "
\n");
+ close_webdoc(wp);
+ }
+
+ fprintf(fp, " Scanner name %s\n", virscan.comment);
+ fprintf(fp, " Command line %s\n", virscan.scanner);
+ fprintf(fp, " Options %s\n", virscan.options);
+ fprintf(fp, " Available %s\n", getboolean(virscan.available));
+ fprintf(fp, " Errorlevel OK %d\n", virscan.error);
+ fprintf(fp, "\n\n\n");
+ j++;
+ }
+
+ fprintf(ip, "
\n");
+ close_webdoc(ip);
+
+ fclose(vir);
+ return page;
}
diff --git a/mbsetup/mbsetup.c b/mbsetup/mbsetup.c
index d86f21df..c6436762 100644
--- a/mbsetup/mbsetup.c
+++ b/mbsetup/mbsetup.c
@@ -196,7 +196,8 @@ void site_docs(void)
if (config_read() == -1)
return;
- sprintf(temp, "%s/doc/site.doc", getenv("MBSE_ROOT"));
+ sprintf(temp, "%s/share/doc/site.doc", getenv("MBSE_ROOT"));
+ mkdirs(temp, 0755);
if ((fp = fopen(temp, "w")) == NULL)
return;
@@ -225,30 +226,30 @@ void site_docs(void)
fprintf(hp, " - Global Configuration
\n");
fprintf(hp, " - Fido Networks
\n");
fprintf(hp, " - Archivers
\n");
- fprintf(hp, " - Virus Scaners
\n");
+ fprintf(hp, " - Virus Scanners
\n");
fprintf(hp, " - Modem Types
\n");
- fprintf(hp, " - TTY Lines Info
\n");
+ fprintf(hp, " - TTY Lines Info
\n");
fprintf(hp, " - Fidonet Nodes
\n");
fprintf(hp, " - BBS: Security Limits
\n");
fprintf(hp, " - BBS: Language Setup
\n");
fprintf(hp, " - BBS: BBS Menus
\n");
fprintf(hp, " - BBS: File Areas
\n");
- fprintf(hp, " - BBS: Transfer Protocols
\n");
+ fprintf(hp, " - BBS: Transfer Protocols
\n");
fprintf(hp, " - BBS: Oneliners
\n");
fprintf(hp, " - Mail: Echomail Groups
\n");
fprintf(hp, " - Mail: Echomail Areas
\n");
fprintf(hp, " - TIC: FileEcho Groups
\n");
- fprintf(hp, " - TIC: Fileecho Areas
\n");
+ fprintf(hp, " - TIC: Fileecho Areas
\n");
fprintf(hp, " - TIC: Hatch Manager
\n");
fprintf(hp, " - TIC: Magic Files
\n");
fprintf(hp, " - Newfiles Groups
\n");
fprintf(hp, " - Newfiles Reports
\n");
fprintf(hp, " - Filefind Setup
\n");
- fprintf(hp, " - BBS Users
\n");
- fprintf(hp, " - Mail Services
\n");
+ fprintf(hp, " - BBS Users
\n");
+ fprintf(hp, " - Mail Service Manager
\n");
fprintf(hp, " - Domain translation
\n");
- fprintf(hp, " - Task Manager
\n");
- fprintf(hp, " - Network Routing
\n");
+ fprintf(hp, " - Task Manager
\n");
+ fprintf(hp, " - Network Routing
\n");
fprintf(hp, "\n");
close_webdoc(hp);
} else {
@@ -292,6 +293,8 @@ void site_docs(void)
dotter();
page = route_doc(fp, toc, page);
dotter();
+ users_doc();
+ dotter();
ol_doc();
clrtoeol();
mvprintw( 8,11, (char *)"Created site documents in %s/doc", getenv("MBSE_ROOT"));
diff --git a/mbsetup/mutil.c b/mbsetup/mutil.c
index 1c3ff716..24f23398 100644
--- a/mbsetup/mutil.c
+++ b/mbsetup/mutil.c
@@ -152,7 +152,7 @@ FILE *open_webdoc(char *filename, char *title, char *title2)
time_t now;
temp = calloc(PATH_MAX, sizeof(char));
- sprintf(temp, "%s/doc/html/%s", getenv("MBSE_ROOT"), filename);
+ sprintf(temp, "%s/share/doc/html/%s", getenv("MBSE_ROOT"), filename);
mkdirs(temp, 0755);
if ((fp = fopen(temp, "w+")) == NULL) {