diff --git a/TODO b/TODO index c8686c3a..68eef9af 100644 --- a/TODO +++ b/TODO @@ -171,10 +171,7 @@ mbsetup: X: Generate crossreference document: Filefind flags <=> TIC Areas - Echomail <=> Nodes Fileechos <=> Groups - Fileechos <=> Nodes Fileechos <=> Magic processing Fileechos <=> Hatch - Newfiles <=> Newfiles groups diff --git a/mbsetup/m_new.c b/mbsetup/m_new.c index abaf5868..8ea4ca7e 100644 --- a/mbsetup/m_new.c +++ b/mbsetup/m_new.c @@ -601,10 +601,10 @@ int new_doc(FILE *fp, FILE *toc, int page) fread(&group, sizeof(group), 1, no); if (strlen(group)) { if (i) - fprintf(wp, " %s\n", group, group); + fprintf(wp, " %s\n", group); else - fprintf(wp, "File groups%s\n", - group, group); + fprintf(wp, "New groups%s\n", + group); fprintf(fp, "%-12s ", group); if (((i+1) %5) == 0) fprintf(fp, "\n "); diff --git a/mbsetup/m_ngroup.c b/mbsetup/m_ngroup.c index e54dd4e2..a9544e89 100644 --- a/mbsetup/m_ngroup.c +++ b/mbsetup/m_ngroup.c @@ -496,9 +496,9 @@ char *PickNGroup(char *shdr) int newf_group_doc(FILE *fp, FILE *toc, int page) { - char *temp; + char *temp, group[13]; FILE *ip, *wp, *no; - int refs, nr; + int i, groups, refs, nr; temp = calloc(PATH_MAX, sizeof(char)); sprintf(temp, "%s/etc/ngroups.data", getenv("MBSE_ROOT")); @@ -576,6 +576,31 @@ int newf_group_doc(FILE *fp, FILE *toc, int page) } fclose(ip); } + sprintf(temp, "%s/etc/newfiles.data", getenv("MBSE_ROOT")); + if ((ip = fopen(temp, "r"))) { + fread(&newfileshdr, sizeof(newfileshdr), 1, ip); + nr = 0; + while ((fread(&newfiles, newfileshdr.recsize, 1, ip)) == 1) { + nr++; + groups = newfileshdr.grpsize / sizeof(group); + for (i = 0; i < groups; i++) { + fread(&group, sizeof(group), 1, ip); + if (newfiles.Active && strlen(group) && (strcmp(ngroup.Name, group) == 0)) { + if (refs == 0) { + fprintf(wp, "
\n"); + fprintf(wp, "

References for group %s

\n", ngroup.Name); + fprintf(wp, "\n"); + fprintf(wp, "\n"); + fprintf(wp, "\n"); + } + refs++; + fprintf(wp, "\n", + nr, nr, newfiles.Comment); + } + } + } + fclose(ip); + } if (refs) { fprintf(wp, "\n"); fprintf(wp, "
Report %d%s
\n"); diff --git a/mbsetup/m_node.c b/mbsetup/m_node.c index 62a7d146..c9a34715 100644 --- a/mbsetup/m_node.c +++ b/mbsetup/m_node.c @@ -1391,144 +1391,368 @@ fidoaddr PullUplink(char *Hdr) int node_doc(FILE *fp, FILE *toc, int page) { - char temp[PATH_MAX]; - FILE *no; - int groups, i, First = TRUE; - char group[13]; + char temp[PATH_MAX]; + FILE *ti, *wp, *ip, *no; + int systems, groups, nr, refs, i, j, k, First = TRUE; + char group[13]; + sysconnect System; - sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT")); - if ((no = fopen(temp, "r")) == NULL) - return page; - - fread(&nodeshdr, sizeof(nodeshdr), 1, no); - fseek(no, 0, SEEK_SET); - fread(&nodeshdr, nodeshdr.hdrsize, 1, no); - - while ((fread(&nodes, nodeshdr.recsize, 1, no)) == 1) { - - page = newpage(fp, page); - - if (First) { - addtoc(fp, toc, 7, 0, page, (char *)"Fidonet nodes"); - First = FALSE; - fprintf(fp, "\n"); - } else - fprintf(fp, "\n\n"); - - fprintf(fp, " Sysop %s\n", nodes.Sysop); - if (strlen(nodes.OutBox)) - fprintf(fp, " Outbox dir %s\n", nodes.OutBox); - fprintf(fp, " First date %s", ctime(&nodes.StartDate)); - fprintf(fp, " Last date %s", ctime(&nodes.LastDate)); - for (i = 0; i < 20; i++) - if (nodes.Aka[i].zone) - fprintf(fp, " Aka %2d %s\n", i+1, aka2str(nodes.Aka[i])); - if (nodes.RouteVia.zone) - fprintf(fp, " Route via %s\n", aka2str(nodes.RouteVia)); - - fprintf(fp, " Session pwd %s\n", nodes.Spasswd); - if (strlen(nodes.dial)) - fprintf(fp, " Dial command %s\n", nodes.dial); - if (strlen(nodes.phone[0]) || strlen(nodes.phone[1])) - fprintf(fp, " Phone numbers %s %s\n", nodes.phone[0], nodes.phone[1]); - if (strlen(nodes.Nl_flags)) - fprintf(fp, " Nodelist flags %s\n", nodes.Nl_flags); - if (strlen(nodes.Nl_hostname)) - fprintf(fp, " Hostname %s\n", nodes.Nl_hostname); - fprintf(fp, " PKT password %s\n", nodes.Epasswd); - fprintf(fp, " Files passwd %s\n", nodes.Fpasswd); - fprintf(fp, " Areamgr pwd %s\n\n", nodes.Apasswd); - - fprintf(fp, " Mail direct %s", getboolean(nodes.Direct)); - fprintf(fp, " Mail crash %s", getboolean(nodes.Crash)); - fprintf(fp, " Mail hold %s\n", getboolean(nodes.Hold)); - fprintf(fp, " Pack mail %s", getboolean(nodes.PackNetmail)); - fprintf(fp, " Send notify %s", getboolean(nodes.Notify)); - fprintf(fp, " Language %c\n", nodes.Language); - fprintf(fp, " No EMSI %s", getboolean(nodes.NoEMSI)); - fprintf(fp, " No YooHoo/2U2 %s", getboolean(nodes.NoWaZOO)); - fprintf(fp, " No Requests %s\n", getboolean(nodes.NoFreqs)); - fprintf(fp, " Don't call %s", getboolean(nodes.NoCall)); - fprintf(fp, " 8.3 filenames %s", getboolean(nodes.FNC)); - fprintf(fp, " No Zmodem %s\n", getboolean(nodes.NoZmodem)); - fprintf(fp, " No Zedzap %s", getboolean(nodes.NoZedzap)); - fprintf(fp, " No Hydra %s", getboolean(nodes.NoHydra)); - fprintf(fp, " binkp old esc %s\n", getboolean(nodes.WrongEscape)); - fprintf(fp, " No binkp/1.1 %s", getboolean(nodes.NoBinkp11)); - fprintf(fp, " Mail forward %s", getboolean(nodes.MailFwd)); - fprintf(fp, " Check mailpwd %s\n", getboolean(nodes.MailPwdCheck)); - fprintf(fp, " ARCmail comp. %s", getboolean(nodes.ARCmailCompat)); - fprintf(fp, " ACRmail a..z %s", getboolean(nodes.ARCmailAlpha)); - fprintf(fp, " Send message %s\n", getboolean(nodes.Message)); - fprintf(fp, " Send .TIC %s", getboolean(nodes.Tic)); - fprintf(fp, " File forward %s", getboolean(nodes.FileFwd)); - fprintf(fp, " Advanced TIC %s\n", getboolean(nodes.AdvTic)); - fprintf(fp, " Advanded SB %s", getboolean(nodes.TIC_AdvSB)); - fprintf(fp, " Sent To lines %s", getboolean(nodes.TIC_To)); - fprintf(fp, " Uplink add + %s\n", getboolean(nodes.AddPlus)); - fprintf(fp, " Security flags %s\n\n", getflag(nodes.Security.flags, nodes.Security.notflags)); - - fprintf(fp, " Outb session %s\n", get_sessiontype(nodes.Session_out)); - if (nodes.Session_out == S_DIR) { - fprintf(fp, " Path %s\n", nodes.Dir_out_path); - fprintf(fp, " Check lock %s", getboolean(nodes.Dir_out_chklck)); - fprintf(fp, " Wait clear lck %s\n", getboolean(nodes.Dir_out_waitclr)); - if (nodes.Dir_out_chklck) - fprintf(fp, " File to check %s\n", nodes.Dir_out_clock); - fprintf(fp, " Create lock %s\n", getboolean(nodes.Dir_out_mklck)); - if (nodes.Dir_out_mklck) - fprintf(fp, " File to create %s\n", nodes.Dir_out_mlock); - } - fprintf(fp, " Inb session %s\n", get_sessiontype(nodes.Session_in)); - if (nodes.Session_in == S_DIR) { - fprintf(fp, " Path %s\n", nodes.Dir_in_path); - fprintf(fp, " Check lock %s", getboolean(nodes.Dir_in_chklck)); - fprintf(fp, " Wait clear lck %s\n", getboolean(nodes.Dir_in_waitclr)); - if (nodes.Dir_in_chklck) - fprintf(fp, " File to check %s\n", nodes.Dir_in_clock); - fprintf(fp, " Create lock %s\n", getboolean(nodes.Dir_in_mklck)); - if (nodes.Dir_in_mklck) - fprintf(fp, " File to create %s\n", nodes.Dir_in_mlock); - } - fprintf(fp, "\n"); - - fprintf(fp, " Uplink mgrs Program Password\n"); - fprintf(fp, " ------------ --------- ---------------\n"); - fprintf(fp, " Files %s %s\n", padleft(nodes.UplFmgrPgm, 9, ' '), nodes.UplFmgrPass); - fprintf(fp, " Mail %s %s\n\n", padleft(nodes.UplAmgrPgm, 9, ' '), nodes.UplAmgrPass); - - fprintf(fp, " Statistics Send KBytes Received KBytes\n"); - fprintf(fp, " ------------ -------- -------- -------- --------\n"); - fprintf(fp, " Total files %-8lu %-8lu %-8lu %-8lu\n", nodes.FilesSent.total, nodes.F_KbSent.total, nodes.FilesRcvd.total, nodes.F_KbSent.total); - fprintf(fp, " Total mail %-8lu %-8lu\n\n", nodes.MailSent.total, nodes.MailRcvd.total); - - fprintf(fp, " File groups:\n "); - groups = nodeshdr.filegrp / sizeof(group); - for (i = 0; i < groups; i++) { - fread(&group, sizeof(group), 1, no); - if (strlen(group)) { - fprintf(fp, "%-12s ", group); - if (((i+1) % 5) == 0) - fprintf(fp, "\n "); - } - } - if ((i+1) % 5) - fprintf(fp, "\n"); - fprintf(fp, "\n Mail groups:\n "); - groups = nodeshdr.mailgrp / sizeof(group); - for (i = 0; i < groups; i++) { - fread(&group, sizeof(group), 1, no); - if (strlen(group)) { - fprintf(fp, "%-12s ", group); - if (((i+1) % 5) == 0) - fprintf(fp, "\n "); - } - } - fprintf(fp, "\n"); - } - - fclose(no); + sprintf(temp, "%s/etc/nodes.data", getenv("MBSE_ROOT")); + if ((no = fopen(temp, "r")) == NULL) return page; + + fread(&nodeshdr, sizeof(nodeshdr), 1, no); + fseek(no, 0, SEEK_SET); + fread(&nodeshdr, nodeshdr.hdrsize, 1, no); + + ip = open_webdoc((char *)"nodes.html", (char *)"Fidonet Nodes", NULL); + fprintf(ip, "Main\n"); + fprintf(ip, "\n"); + close_webdoc(ip); + + fclose(no); + return page; } diff --git a/mbsetup/mbsetup.c b/mbsetup/mbsetup.c index 365ec105..94239379 100644 --- a/mbsetup/mbsetup.c +++ b/mbsetup/mbsetup.c @@ -238,7 +238,7 @@ void site_docs(void) fprintf(hp, "
  • Virus Scaners
  • \n"); fprintf(hp, "
  • Modem Types
  • \n"); fprintf(hp, "
  • TTY Lines Info
  • \n"); - fprintf(hp, "
  • Fidonet Nodes
  • \n"); + fprintf(hp, "
  • Fidonet Nodes
  • \n"); fprintf(hp, "
  • BBS: Security Limits
  • \n"); fprintf(hp, "
  • BBS: Language Setup
  • \n"); fprintf(hp, "
  • BBS: BBS Menus
  • \n");