Page layout changes in site.doc

This commit is contained in:
Michiel Broek 2002-05-20 13:27:12 +00:00
parent cc2f2b1c34
commit 204bd91492
11 changed files with 62 additions and 41 deletions

View File

@ -4679,6 +4679,7 @@ v0.33.20 10-Feb-2002
it can now be reset. it can now be reset.
Protected convert-all setting in menus 10.1 and 10.2 when no Protected convert-all setting in menus 10.1 and 10.2 when no
default archiver is defined. default archiver is defined.
Changed page layout in site.doc
mbmon: mbmon:
The top statusbar now displays the bbs Free/Down/Busy status. The top statusbar now displays the bbs Free/Down/Busy status.

View File

@ -591,7 +591,7 @@ int archive_doc(FILE *fp, FILE *toc, int page)
fread(&archiverhdr, sizeof(archiverhdr), 1, arch); fread(&archiverhdr, sizeof(archiverhdr), 1, arch);
while ((fread(&archiver, archiverhdr.recsize, 1, arch)) == 1) { while ((fread(&archiver, archiverhdr.recsize, 1, arch)) == 1) {
if (j == 4) { if (j == 5) {
page = newpage(fp, page); page = newpage(fp, page);
fprintf(fp, "\n"); fprintf(fp, "\n");
j = 0; j = 0;
@ -607,7 +607,7 @@ int archive_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Unpack files %s\n", archiver.funarc); fprintf(fp, " Unpack files %s\n", archiver.funarc);
fprintf(fp, " Unpack mail %s\n", archiver.munarc); fprintf(fp, " Unpack mail %s\n", archiver.munarc);
fprintf(fp, " Get FILE_ID.DIZ %s\n", archiver.iunarc); fprintf(fp, " Get FILE_ID.DIZ %s\n", archiver.iunarc);
fprintf(fp, "\n\n\n"); fprintf(fp, "\n\n");
j++; j++;
} }

View File

@ -1840,7 +1840,6 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " File description %s on %s\n", get_color(CFG.FiledescF), get_color(CFG.FiledescB)); fprintf(fp, " File description %s on %s\n", get_color(CFG.FiledescF), get_color(CFG.FiledescB));
fprintf(fp, " Message input %s on %s\n", get_color(CFG.MsgInputColourF), get_color(CFG.MsgInputColourB)); fprintf(fp, " Message input %s on %s\n", get_color(CFG.MsgInputColourF), get_color(CFG.MsgInputColourB));
page = newpage(fp, page);
addtoc(fp, toc, 1, 10, page, (char *)"Next user door"); addtoc(fp, toc, 1, 10, page, (char *)"Next user door");
fprintf(fp, " Text file %s\n", CFG.sNuScreen); fprintf(fp, " Text file %s\n", CFG.sNuScreen);
@ -1869,6 +1868,7 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Users time ratio %s\n", CFG.sTimeRatio); fprintf(fp, " Users time ratio %s\n", CFG.sTimeRatio);
fprintf(fp, " Users Kb. ratio %s\n", CFG.sByteRatio); fprintf(fp, " Users Kb. ratio %s\n", CFG.sByteRatio);
page = newpage(fp, page);
addtoc(fp, toc, 1, 13, page, (char *)"Sysop paging"); addtoc(fp, toc, 1, 13, page, (char *)"Sysop paging");
fprintf(fp, " Ext. Chat program %s\n", CFG.sExternalChat); fprintf(fp, " Ext. Chat program %s\n", CFG.sExternalChat);
@ -1893,7 +1893,6 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Friday %s %s\n", CFG.cStartTime[5], CFG.cStopTime[5]); fprintf(fp, " Friday %s %s\n", CFG.cStartTime[5], CFG.cStopTime[5]);
fprintf(fp, " Saterday %s %s\n", CFG.cStartTime[6], CFG.cStopTime[6]); fprintf(fp, " Saterday %s %s\n", CFG.cStartTime[6], CFG.cStopTime[6]);
page = newpage(fp, page);
addtoc(fp, toc, 1, 14, page, (char *)"Fileecho processing"); addtoc(fp, toc, 1, 14, page, (char *)"Fileecho processing");
fprintf(fp, " Keep days on hold %d\n", CFG.tic_days); fprintf(fp, " Keep days on hold %d\n", CFG.tic_days);
@ -1914,6 +1913,7 @@ int global_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Areamgr: TIC %s\n", getboolean(CFG.ct_TIC)); fprintf(fp, " Areamgr: TIC %s\n", getboolean(CFG.ct_TIC));
fprintf(fp, " Areamgr: pause %s\n", getboolean(CFG.ct_Pause)); fprintf(fp, " Areamgr: pause %s\n", getboolean(CFG.ct_Pause));
page = newpage(fp, page);
addtoc(fp, toc, 1, 15, page, (char *)"Fidonet Mail and Echomail processing"); addtoc(fp, toc, 1, 15, page, (char *)"Fidonet Mail and Echomail processing");
fprintf(fp, " Max .pkt size %d Kb.\n", CFG.maxpktsize); fprintf(fp, " Max .pkt size %d Kb.\n", CFG.maxpktsize);

View File

@ -537,7 +537,7 @@ int bbs_lang_doc(FILE *fp, FILE *toc, int page)
while ((fread(&lang, langhdr.recsize, 1, no)) == 1) { while ((fread(&lang, langhdr.recsize, 1, no)) == 1) {
if (j == 5) { if (j == 6) {
page = newpage(fp, page); page = newpage(fp, page);
fprintf(fp, "\n"); fprintf(fp, "\n");
j = 0; j = 0;

View File

@ -507,7 +507,7 @@ int tic_magic_doc(FILE *fp, FILE *toc, int page)
fread(&magichdr, sizeof(magichdr), 1, no); fread(&magichdr, sizeof(magichdr), 1, no);
while (fread(&magic, magichdr.recsize, 1, no) == 1) { while (fread(&magic, magichdr.recsize, 1, no) == 1) {
if (j == 4) { if (j == 6) {
page = newpage(fp, page); page = newpage(fp, page);
fprintf(fp, "\n"); fprintf(fp, "\n");
j = 0; j = 0;

View File

@ -1087,10 +1087,16 @@ int EditMsgRec(int Area)
strncpy(msgs.QWKname, msgs.Tag, 13); strncpy(msgs.QWKname, msgs.Tag, 13);
} }
break; break;
case 3: strcpy(msgs.Group, PickMGroup((char *)"9.2.3")); case 3: tmp = strlen(msgs.Group);
if (strlen(msgs.Group)) { strcpy(msgs.Group, PickMGroup((char *)"9.2.3"));
if (strlen(msgs.Group) && !tmp) {
/*
* If set for the first time, set some defaults
*/
msgs.Aka = mgroup.UseAka; msgs.Aka = mgroup.UseAka;
msgs.Active = TRUE; msgs.Active = TRUE;
msgs.MsgKinds = PUBLIC;
msgs.Type = ECHOMAIL;
msgs.DaysOld = CFG.defdays; msgs.DaysOld = CFG.defdays;
msgs.MaxMsgs = CFG.defmsgs; msgs.MaxMsgs = CFG.defmsgs;
msgs.UsrDelete = mgroup.UsrDelete; msgs.UsrDelete = mgroup.UsrDelete;
@ -1101,6 +1107,9 @@ int EditMsgRec(int Area)
msgs.NetReply = mgroup.NetReply; msgs.NetReply = mgroup.NetReply;
msgs.Quotes = mgroup.Quotes; msgs.Quotes = mgroup.Quotes;
msgs.MaxArticles = CFG.maxarticles; msgs.MaxArticles = CFG.maxarticles;
msgs.Rfccode = CHRS_DEFAULT_RFC;
msgs.Ftncode = CHRS_DEFAULT_FTN;
strncpy(msgs.Origin, CFG.origin, 50);
/* /*
* If there is an uplink defined in the group, * If there is an uplink defined in the group,

View File

@ -555,15 +555,18 @@ void EditMenus(void)
int bbs_menu_doc(FILE *fp, FILE *toc, int page) int bbs_menu_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char *temp;
FILE *no, *mn; FILE *no, *mn;
DIR *dp; DIR *dp;
struct dirent *de; struct dirent *de;
int j; int j;
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/language.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/language.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL) if ((no = fopen(temp, "r")) == NULL) {
free(temp);
return page; return page;
}
page = newpage(fp, page); page = newpage(fp, page);
addtoc(fp, toc, 8, 3, page, (char *)"BBS Menus"); addtoc(fp, toc, 8, 3, page, (char *)"BBS Menus");
@ -577,7 +580,7 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
if (de->d_name[0] != '.') { if (de->d_name[0] != '.') {
j = 0; j = 0;
sprintf(temp, "%s/%s", lang.MenuPath, de->d_name); sprintf(temp, "%s/%s", lang.MenuPath, de->d_name);
fprintf(fp, " MENU %s (%s)\n\n", de->d_name, lang.Name); fprintf(fp, "\n MENU %s (%s)\n\n", de->d_name, lang.Name);
if ((mn = fopen(temp, "r")) != NULL) { if ((mn = fopen(temp, "r")) != NULL) {
while (fread(&menus, sizeof(menus), 1, mn) == 1) { while (fread(&menus, sizeof(menus), 1, mn) == 1) {
if (menus.MenuKey[0]) if (menus.MenuKey[0])
@ -605,9 +608,10 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
} }
fprintf(fp, "\n\n"); fprintf(fp, "\n\n");
j++; j++;
if (j == 5) { if (j == 4) {
j = 0; j = 0;
page = newpage(fp, page); page = newpage(fp, page);
fprintf(fp, "\n");
} }
} }
fclose(mn); fclose(mn);
@ -620,6 +624,7 @@ int bbs_menu_doc(FILE *fp, FILE *toc, int page)
} }
} }
free(temp);
fclose(no); fclose(no);
return page; return page;
} }

View File

@ -630,7 +630,7 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
addtoc(fp, toc, 9, 1, page, (char *)"Mail processing groups"); addtoc(fp, toc, 9, 1, page, (char *)"Mail processing groups");
j = 0; j = 0;
fprintf(fp, "\n\n"); fprintf(fp, "\n");
fread(&mgrouphdr, sizeof(mgrouphdr), 1, no); fread(&mgrouphdr, sizeof(mgrouphdr), 1, no);
fseek(no, 0, SEEK_SET); fseek(no, 0, SEEK_SET);
@ -661,12 +661,7 @@ int mail_group_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " user add/del areas %s\n", getboolean(mgroup.UserChange)); fprintf(fp, " user add/del areas %s\n", getboolean(mgroup.UserChange));
fprintf(fp, " Start area date %s", ctime(&mgroup.StartDate)); fprintf(fp, " Start area date %s", ctime(&mgroup.StartDate));
fprintf(fp, " Last active date %s\n", ctime(&mgroup.LastDate)); fprintf(fp, " Last active date %s\n", ctime(&mgroup.LastDate));
fprintf(fp, "\n\n");
// fprintf(fp, " Total This month Last month\n");
// fprintf(fp, " ---------- ---------- ----------\n");
// fprintf(fp, " Messages %-10ld %-10ld %-10ld\n", mgroup.Total.files, mgroup.ThisMonth.files, mgroup.LastMonth.files);
// fprintf(fp, " Kilobytes %-10ld %-10ld %-10ld\n", mgroup.Total.kbytes, mgroup.ThisMonth.kbytes, mgroup.LastMonth.kbytes);
fprintf(fp, "\n\n\n");
j++; j++;
} }

View File

@ -505,35 +505,29 @@ char *PickNGroup(char *shdr)
int newf_group_doc(FILE *fp, FILE *toc, int page) int newf_group_doc(FILE *fp, FILE *toc, int page)
{ {
char temp[PATH_MAX]; char *temp;
FILE *no; FILE *no;
int j;
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/ngroups.data", getenv("MBSE_ROOT")); sprintf(temp, "%s/etc/ngroups.data", getenv("MBSE_ROOT"));
if ((no = fopen(temp, "r")) == NULL) if ((no = fopen(temp, "r")) == NULL) {
free(temp);
return page; return page;
}
free(temp);
page = newpage(fp, page);
addtoc(fp, toc, 11, 0, page, (char *)"Newfiles announce groups"); addtoc(fp, toc, 11, 0, page, (char *)"Newfiles announce groups");
j = 0; fprintf(fp, "\n");
fprintf(fp, "\n\n"); fprintf(fp, " Name Act Comment\n");
fprintf(fp, " ------------ --- --------------------------------------------------\n");
fread(&ngrouphdr, sizeof(ngrouphdr), 1, no); fread(&ngrouphdr, sizeof(ngrouphdr), 1, no);
fseek(no, 0, SEEK_SET); fseek(no, 0, SEEK_SET);
fread(&ngrouphdr, ngrouphdr.hdrsize, 1, no); fread(&ngrouphdr, ngrouphdr.hdrsize, 1, no);
while ((fread(&ngroup, ngrouphdr.recsize, 1, no)) == 1) { while ((fread(&ngroup, ngrouphdr.recsize, 1, no)) == 1)
if (j == 7) { fprintf(fp, " %-12s %s %s\n", ngroup.Name, getboolean(ngroup.Active), ngroup.Comment);
page = newpage(fp, page);
fprintf(fp, "\n");
j = 0;
}
fprintf(fp, " Name %s\n", ngroup.Name);
fprintf(fp, " Comment %s\n", ngroup.Comment);
fprintf(fp, " Active %s\n", getboolean(ngroup.Active));
fprintf(fp, "\n\n\n");
j++;
}
fclose(no); fclose(no);
return page; return page;

View File

@ -890,9 +890,26 @@ int EditTicRec(int Area)
SetTicScreen(); SetTicScreen();
break; break;
case 4: E_STR( 9,16,14, tic.Message, "The ^message^ to include with the .tic files."); case 4: E_STR( 9,16,14, tic.Message, "The ^message^ to include with the .tic files.");
case 5: strcpy(tic.Group, PickFGroup((char *)"10.2.5")); case 5: tmp = strlen(tic.Group);
if (strlen(tic.Group)) { strcpy(tic.Group, PickFGroup((char *)"10.2.5"));
if (strlen(tic.Group) && !tmp) {
/*
* If set the first time, fill in defaults
*/
tic.Aka = fgroup.UseAka; tic.Aka = fgroup.UseAka;
strncpy(tic.Convert, fgroup.Convert, 5);
strncpy(tic.Banner, fgroup.Banner, 14);
tic.Replace = fgroup.Replace;
tic.DupCheck = fgroup.DupCheck;
tic.Secure = fgroup.Secure;
tic.NoTouch = fgroup.NoTouch;
tic.VirScan = fgroup.VirScan;
tic.Announce = fgroup.Announce;
tic.UpdMagic = fgroup.UpdMagic;
tic.FileId = fgroup.FileId;
tic.ConvertAll = fgroup.ConvertAll;
tic.SendOrg = fgroup.SendOrg;
/* /*
* If there is an uplink defined in the group, * If there is an uplink defined in the group,
* and the first connected system is empty, * and the first connected system is empty,

View File

@ -546,7 +546,7 @@ int tty_doc(FILE *fp, FILE *toc, int page)
fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty); fread(&ttyinfohdr, sizeof(ttyinfohdr), 1, tty);
while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) { while ((fread(&ttyinfo, ttyinfohdr.recsize, 1, tty)) == 1) {
if (j == 3) { if (j == 4) {
page = newpage(fp, page); page = newpage(fp, page);
fprintf(fp, "\n"); fprintf(fp, "\n");
j = 0; j = 0;
@ -565,7 +565,7 @@ int tty_doc(FILE *fp, FILE *toc, int page)
fprintf(fp, " Modem type %s\n", ttyinfo.modem); fprintf(fp, " Modem type %s\n", ttyinfo.modem);
fprintf(fp, " Locked speed %ld\n", ttyinfo.portspeed); fprintf(fp, " Locked speed %ld\n", ttyinfo.portspeed);
fprintf(fp, " EMSI name %s\n", ttyinfo.name); fprintf(fp, " EMSI name %s\n", ttyinfo.name);
fprintf(fp, "\n\n\n"); fprintf(fp, "\n\n");
j++; j++;
} }