Separated tty drivers for mbsebbs and mbnewusr

This commit is contained in:
Michiel Broek 2004-10-27 11:08:09 +00:00
parent d828e13b14
commit fd8eb8b6f3
127 changed files with 1951 additions and 1712 deletions

View File

@ -1,6 +1,9 @@
$Id$
v0.71.0 27-Oct-2004
v0.70.0 06-Jun-2004 - 26-Oct-2004.
upgrade:

View File

@ -29,6 +29,6 @@ mbsebbs-0_51_00_current 09-Feb-2004 Start 0.51 development.
mbsebbs-0_60_00_release 04-Jun-2004 Version 0.60.0 release.
mbsebbs-0_61_00_current 06-Jun-2004 Start 0.61 development.
mbsebbs-0_70_00_release 26-Oct-2004 Version 0.70.0 release.
mbsebbs-0_71_00_current 27-Oct-2004 Start 0.71 development.
Michiel.

2
TODO
View File

@ -1,6 +1,6 @@
$Id$
MBSE BBS V0.70.0 TODO list.
MBSE BBS V0.71.0 TODO list.
---------------------------
These are a list of things that must be implemented one way or

2
configure vendored
View File

@ -1309,7 +1309,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbnntp mbtask mbsetup unix lang example
PACKAGE="mbsebbs"
MAJOR="0"
MINOR="70"
MINOR="71"
REVISION="0"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"

View File

@ -12,7 +12,7 @@ dnl After changeing the version number, run autoconf!
dnl
PACKAGE="mbsebbs"
MAJOR="0"
MINOR="70"
MINOR="71"
REVISION="0"
VERSION="$MAJOR.$MINOR.$REVISION"
COPYRIGHT="Copyright (C) 1997-2004 Michiel Broek, All Rights Reserved"

View File

@ -2278,18 +2278,11 @@ char *TearLine(void);
/*
* From term.c
*/
void TermInit(int, int, int);
void Enter(int);
void pout(int, int, char *);
void poutCR(int, int, char *);
void poutCenter(int,int,char *);
void colour(int, int);
void Center(char *);
void clear(void);
void locate(int, int);
void fLine(int);
void sLine(void);
void mvprintw(int, int, const char *, ...);
void mbse_TermInit(int, int, int);
void mbse_colour(int, int);
void mbse_clear(void);
void mbse_locate(int, int);
void mbse_mvprintw(int, int, const char *, ...);

View File

@ -324,6 +324,55 @@ typedef struct {
/*
* Changes ansi background and foreground color
*/
void msg_colour(int, int);
void msg_colour(int fg, int bg)
{
int att=0, fore=37, back=40;
if (fg<0 || fg>31 || bg<0 || bg>7) {
fprintf(stdout, "ANSI: Illegal colour specified: %i, %i\n", fg, bg);
fflush(stdout);
return;
}
fprintf(stdout, "ESC[");
if ( fg > WHITE) {
fprintf(stdout, "5;");
fg-= 16;
}
if (fg > LIGHTGRAY) {
att=1;
fg=fg-8;
}
if (fg == BLACK) fore=30;
else if (fg == BLUE) fore=34;
else if (fg == GREEN) fore=32;
else if (fg == CYAN) fore=36;
else if (fg == RED) fore=31;
else if (fg == MAGENTA) fore=35;
else if (fg == BROWN) fore=33;
else fore=37;
if (bg == BLUE) back=44;
else if (bg == GREEN) back=42;
else if (bg == CYAN) back=46;
else if (bg == RED) back=41;
else if (bg == MAGENTA) back=45;
else if (bg == BROWN) back=43;
else if (bg == LIGHTGRAY) back=47;
else back=40;
fprintf(stdout, "%d;%d;%dm", att, fore, back);
fflush(stdout);
}
/*
* Link messages in one area.
* Returns -1 if error, else the number of linked messages.
@ -340,9 +389,9 @@ int Msg_Link(char *Path, int do_quiet, int slow_util)
}
if (!do_quiet) {
colour(12, 0);
msg_colour(12, 0);
printf(" (linking)");
colour(13, 0);
msg_colour(13, 0);
fflush(stdout);
}
@ -439,6 +488,8 @@ int Msg_Link(char *Path, int do_quiet, int slow_util)
return msg_link;
}
/*
* Fgets() is like fgets() but never returns the line terminator
* at end of line and handles that line terminators:

View File

@ -44,14 +44,14 @@ int rearc(char *filename, char *arctype, int do_quiet)
Syslog('f', "rearc(%s, %s)", filename, arctype);
if (!do_quiet) {
colour(12, 0);
mbse_colour(12, 0);
printf(" ReArc file %s ", filename);
fflush(stdout);
}
if (strchr(filename, '/') == NULL) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" no path in filename\n");
}
Syslog('+', "rearc(%s, %s), no path in filename", filename, arctype);
@ -60,7 +60,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
if ((unarc = unpacker(filename)) == NULL) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" unknown archive type\n");
}
return -1;
@ -68,7 +68,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
if (!getarchiver(unarc)) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" no unarchiver available\n");
}
Syslog('+', "rearc(%s, %s), no unarchiver available", filename, arctype);
@ -78,7 +78,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
uncmd = xstrcpy(archiver.funarc);
if ((uncmd == NULL) || (uncmd == "")) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" no unarchive command available\n");
}
Syslog('+', "rearc(%s, %s), no unarchive command available", filename, arctype);
@ -93,7 +93,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
if (!getarchiver(arctype)) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" no archiver available\n");
}
Syslog('+', "rearc(%s, %s), no archiver available", filename, arctype);
@ -104,7 +104,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
if (strcmp(unarc, archiver.name) == 0) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" already in %s format\n", arctype);
}
Syslog('+', "rearc(%s, %s), already in %s format", filename, arctype, arctype);
@ -119,7 +119,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
arccmd = xstrcpy(archiver.farc);
if ((arccmd == NULL) || (arccmd == "")) {
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf(" no archive command available\n");
}
Syslog('+', "rearc(%s, %s), no archive command available", filename, arctype);
@ -145,7 +145,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
}
if (!do_quiet) {
colour(11, 0);
mbse_colour(11, 0);
printf("\rUnpacking file %s ", filename);
fflush(stdout);
}
@ -165,7 +165,7 @@ int rearc(char *filename, char *arctype, int do_quiet)
}
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("\r Packing file %s ", newname);
}

View File

@ -39,7 +39,7 @@ int termx = 80;
int termy = 24;
void TermInit(int mode, int x, int y)
void mbse_TermInit(int mode, int x, int y)
{
termmode = mode;
termx = x;
@ -48,52 +48,10 @@ void TermInit(int mode, int x, int y)
/*
* Function will print about of enters specified
*/
void Enter(int num)
{
int i;
for (i = 0; i < num; i++)
fprintf(stdout, "\n");
fflush(stdout);
}
void pout(int fg, int bg, char *Str)
{
colour(fg, bg);
fprintf(stdout, Str);
fflush(stdout);
}
void poutCenter(int fg, int bg, char *Str)
{
colour(fg, bg);
Center(Str);
}
void poutCR(int fg, int bg, char *Str)
{
colour(fg, bg);
fputs(Str, stdout);
fprintf(stdout, "\n");
fflush(stdout);
}
/*
* Changes ansi background and foreground color
*/
void colour(int fg, int bg)
void mbse_colour(int fg, int bg)
{
if (termmode == 1) {
@ -140,42 +98,16 @@ void colour(int fg, int bg)
void Center(char *string)
{
int Strlen;
int Maxlen = termx;
int i, x, z;
char *Str;
Str = calloc(1024, sizeof(char));
Strlen = strlen(string);
if (Strlen == Maxlen)
fprintf(stdout, "%s\n", string);
else {
x = Maxlen - Strlen;
z = x / 2;
for (i = 0; i < z; i++)
strcat(Str, " ");
strcat(Str, string);
fprintf(stdout, "%s\n", Str);
}
fflush(stdout);
free(Str);
}
void clear()
void mbse_clear()
{
if (termmode == 1) {
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
fprintf(stdout, ANSI_HOME);
fprintf(stdout, ANSI_CLEAR);
} else {
fprintf(stdout, "\n");
}
fflush(stdout);
} else
Enter(1);
}
@ -183,7 +115,7 @@ void clear()
/*
* Moves cursor to specified position
*/
void locate(int y, int x)
void mbse_locate(int y, int x)
{
if (termmode > 0) {
if (y > termy || x > termx) {
@ -198,36 +130,10 @@ void locate(int y, int x)
void fLine(int Len)
{
int x;
if (termmode == 0)
for (x = 0; x < Len; x++)
fprintf(stdout, "-");
if (termmode == 1)
for (x = 0; x < Len; x++)
fprintf(stdout, "%c", 196);
fprintf(stdout, " \n");
fflush(stdout);
}
void sLine()
{
fLine(termx -1);
}
/*
* curses compatible functions
*/
void mvprintw(int y, int x, const char *format, ...)
void mbse_mvprintw(int y, int x, const char *format, ...)
{
char *outputstr;
va_list va_ptr;
@ -238,11 +144,10 @@ void mvprintw(int y, int x, const char *format, ...)
vsprintf(outputstr, format, va_ptr);
va_end(va_ptr);
locate(y, x);
mbse_locate(y, x);
fprintf(stdout, outputstr);
free(outputstr);
fflush(stdout);
}

View File

@ -181,7 +181,7 @@ int main(int argc, char *argv[])
InitConfig();
InitNode();
InitFidonet();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = c_start = c_end = time(NULL);
InitClient(pw->pw_name, (char *)"mbcico", CFG.location, CFG.logfile,

View File

@ -59,9 +59,9 @@ void ProgName()
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBOUT: MBSE BBS %s Outbound Manager\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
}
@ -97,7 +97,7 @@ void die(int onsig)
do_quiet = FALSE;
if (!do_quiet)
colour(3, 0);
mbse_colour(3, 0);
if (onsig) {
if (onsig <= NSIG)
@ -110,7 +110,7 @@ void die(int onsig)
Syslog(' ', "MBOUT finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
}
ExitClient(onsig);
@ -124,11 +124,11 @@ void Help()
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mbout [command] <params> <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" a att <node> <flavor> <file> Attach a file to a node\n");
printf(" n node <node> Show nodelist information\n");
printf(" p poll <node> [node..node] Poll node(s) (always crash)\n");
@ -139,11 +139,11 @@ void Help()
printf("\n");
printf(" <node> Should be in domain form, e.g. f16.n2801.z2.domain\n");
printf(" <flavor> Flavor's are: crash | immediate | normal | hold\n");
colour(9, 0);
mbse_colour(9, 0);
printf("\n Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -quiet Quiet mode\n");
colour(7, 0);
mbse_colour(7, 0);
die(MBERR_OK);
}
@ -154,7 +154,7 @@ void Fatal(char *msg, int error)
{
show_log = TRUE;
if (!do_quiet) {
colour(12, 0);
mbse_colour(12, 0);
printf("%s\n", msg);
}
WriteError(msg);
@ -177,7 +177,7 @@ int main(int argc, char *argv[])
InitConfig();
InitNode();
InitFidonet();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
umask(002);
@ -234,7 +234,7 @@ int main(int argc, char *argv[])
free(cmd);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\n");
}

View File

@ -50,7 +50,7 @@ int nlinfo(faddr *addr)
nlent = getnlent(addr);
if (nlent->pflag != NL_DUMMY) {
colour(3, 0);
mbse_colour(3, 0);
printf("System : %s\n", nlent->name);
printf("Sysop : %s@%s\n", nlent->sysop, ascinode(addr, 0x3f));
printf("Location : %s\n", nlent->location);

View File

@ -282,9 +282,9 @@ int outstat()
}
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("flavor try size age address\n");
colour(3, 0);
mbse_colour(3, 0);
}
Syslog('+', "Flavor Try Size Age Address");

View File

@ -67,7 +67,7 @@ void Uploads()
IsDoing("Check uploads");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf(" Checking uploads...\n");
}
@ -373,7 +373,7 @@ int Announce()
int i, groups, any;
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Announce new files\n");
}

View File

@ -94,11 +94,11 @@ void ScanArea(ff_list **ffl)
unsigned long Number, Highest;
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r %-40s", scanmgr.Comment);
colour(12, 0);
mbse_colour(12, 0);
printf(" (Scanning) ");
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
Syslog('+', "Scanning %s", scanmgr.Comment);
@ -267,12 +267,12 @@ void ScanFiles(ff_list *tmp)
Syslog('+', "ff: %s [%s]", temp, tmp->subject);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
temp[40] = '\0';
printf("\r %-40s", temp);
colour(12, 0);
mbse_colour(12, 0);
printf(" (Searching)");
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
@ -363,7 +363,7 @@ void ScanFiles(ff_list *tmp)
if (found) {
if (!do_quiet) {
colour(14, 0);
mbse_colour(14, 0);
printf(" (Replying)");
fflush(stdout);
}
@ -488,7 +488,7 @@ int Filefind()
IsDoing("FileFind");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Processing FileFind requests\n");
}
Syslog('+', "Processing FileFind requests");
@ -520,7 +520,7 @@ int Filefind()
if (Replies)
rc = TRUE;
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Processed %d requests, created %d replies\n", Requests, Replies);
}
}

View File

@ -121,7 +121,7 @@ void MakeStat(void)
}
if (!do_quiet) {
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("\rMaking statistical HTML pages");
fflush(stdout);
}

View File

@ -53,9 +53,9 @@ void ProgName(void)
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBAFF: MBSE BBS %s Announce new files and FileFind\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
}
@ -77,7 +77,7 @@ void die(int onsig)
Syslog(' ', "MBAFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
}
ExitClient(onsig);
@ -93,7 +93,7 @@ int main(int argc, char **argv)
struct tm *t;
InitConfig();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
t = localtime(&t_start);
Diw = t->tm_wday;
@ -178,18 +178,18 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mbaff [command] <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" a announce Announce new files\n");
printf(" f filefind FileFind service\n");
colour(9, 0);
mbse_colour(9, 0);
printf("\n Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -q -quiet Quiet mode\n");
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
die(MBERR_COMMANDLINE);
}

View File

@ -58,9 +58,9 @@ void ProgName(void)
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBDIFF: MBSE BBS %s Nodelist diff processor\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
}
@ -100,7 +100,7 @@ void die(int onsig)
Syslog(' ', "MBDIFF finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
}
ExitClient(onsig);
@ -117,7 +117,7 @@ int main(int argc, char **argv)
struct dirent *de;
InitConfig();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
umask(002);
@ -165,7 +165,7 @@ int main(int argc, char **argv)
free(cmd);
if (!do_quiet) {
colour(12, 0);
mbse_colour(12, 0);
printf("\n");
}
@ -363,7 +363,7 @@ int main(int argc, char **argv)
Syslog('+', "Apply %s with %s to %s", onl, ond, nn);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Apply %s with %s to %s\n", onl, ond, nn);
}
rc = apply(onl, ond, nn);
@ -433,20 +433,20 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mbdiff [nodelist] [nodediff] <options>\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" The nodelist must be the full path and filename\n");
printf(" without the dot and daynumber digits to the working\n");
printf(" directory of that nodelist.\n");
printf(" The nodediff must be the full path and filename\n");
printf(" to the (compressed) nodediff file in the download\n");
printf(" directory.\n");
colour(9, 0);
mbse_colour(9, 0);
printf("\n Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -quiet Quiet mode\n");
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
die(MBERR_COMMANDLINE);
}
@ -539,7 +539,7 @@ int apply(char *nl, char *nd, char *nn)
if ((rc != 0) && !do_quiet) {
show_log = TRUE;
colour(12, 0);
mbse_colour(12, 0);
}
if ((rc == 0) && (mycrc != theircrc))

View File

@ -56,7 +56,7 @@ void AdoptFile(int Area, char *File, char *Description)
Syslog('f', "Adopt(%d, %s, %s)", Area, MBSE_SS(File), MBSE_SS(Description));
if (!do_quiet)
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
if (LoadAreaRec(Area) == FALSE)
die(MBERR_INIT_ERROR);

View File

@ -80,7 +80,7 @@ void Check(long AreaNr)
newdir = calloc(PATH_MAX, sizeof(char));
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Checking file database...\n");
}

View File

@ -54,7 +54,7 @@ void Delete(int UnDel, int Area, char *File)
IsDoing("Undelete file");
else
IsDoing("Delete file");
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
/*
* Check area
@ -80,7 +80,7 @@ void Delete(int UnDel, int Area, char *File)
die(MBERR_GENERAL);
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
strcpy(mask, re_mask(File, FALSE));
if (re_comp(mask))
die(MBERR_GENERAL);

View File

@ -110,11 +110,11 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(LIGHTCYAN, BLACK);
mbse_colour(LIGHTCYAN, BLACK);
printf("\nUsage: mbfido [command(s)] <options>\n\n");
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf(" Commands are:\n\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" a areas Process Areas taglists\n");
printf(" m mail <recipient> ... MTA Mail mode\n");
printf(" ne news Scan for new news\n");
@ -127,9 +127,9 @@ void Help(void)
printf(" to toss Toss incoming Fido mail\n");
printf(" u uucp Process UUCP batchfile\n");
printf(" w web Create WWW statistics\n\n");
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf(" Options are:\n\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" -f -full Full Mailscan\n");
printf(" -l -learn Learn News dupes\n");
printf(" -noc -nocrc Skip CRC checking\n");
@ -137,7 +137,7 @@ void Help(void)
printf(" -q -quiet Quiet mode\n");
printf(" -uns -unsecure Toss unsecure\n");
printf(" -unp -unprotect Toss unprotected inbound\n");
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
ExitClient(MBERR_COMMANDLINE);
}
@ -151,9 +151,9 @@ void ProgName(void)
if (do_quiet)
return;
colour(WHITE, BLACK);
mbse_colour(WHITE, BLACK);
printf("\nMBFIDO: MBSE BBS %s - Fidonet File and Mail processor\n", VERSION);
colour(YELLOW, BLACK);
mbse_colour(YELLOW, BLACK);
printf(" %s\n", COPYRIGHT);
}
@ -196,7 +196,7 @@ void die(int onsig)
if (!do_quiet) {
show_log = TRUE;
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
}
if (onsig) {
@ -246,7 +246,7 @@ void die(int onsig)
Syslog(' ', "MBFIDO finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet)
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
ExitClient(onsig);
}
@ -298,7 +298,7 @@ int main(int argc, char **argv)
InitTic();
InitUser();
InitFidonet();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
t = localtime(&t_start);
Diw = t->tm_wday;
@ -608,7 +608,7 @@ int main(int argc, char **argv)
NewsUUCP();
if (do_areas) {
if (!do_quiet) {
colour(LIGHTGREEN, BLACK);
mbse_colour(LIGHTGREEN, BLACK);
printf("Are you sure to process all area lists [y/N] ");
fflush(stdout);
x = Getone();

View File

@ -76,7 +76,7 @@ int main(int argc, char **argv)
struct passwd *pw;
InitConfig();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
umask(002);

View File

@ -57,7 +57,7 @@ void ImportFiles(int Area)
Syslog('f', "Import(%d)", Area);
if (!do_quiet)
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
if (LoadAreaRec(Area) == FALSE)
die(MBERR_INIT_ERROR);

View File

@ -328,7 +328,7 @@ void ReqIndex(void)
IsDoing("Index files");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Create index files...\n");
}
@ -516,7 +516,7 @@ void HtmlIndex(char *Lang)
IsDoing("Create html");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\rCreate html pages... \n");
}

View File

@ -63,7 +63,7 @@ void Kill(void)
IsDoing("Kill files");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Kill/move files...\n");
}

View File

@ -63,7 +63,7 @@ void ListFileAreas(int Area)
columns = i;
}
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
sAreas = calloc(PATH_MAX, sizeof(char));
fAreas = calloc(PATH_MAX, sizeof(char));
sTic = calloc(PATH_MAX, sizeof(char));
@ -110,7 +110,7 @@ void ListFileAreas(int Area)
fdb_area = mbsedb_OpenFDB(Area, 30);
fcount = 0;
fsize = 0L;
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("File listing of area %d, %s\n\n", Area, area.Name);
printf("Short name Kb. File date Down Flg TIC Area Long name\n");
printf("------------ ----- ---------- ---- --- -------------------- ");
@ -118,7 +118,7 @@ void ListFileAreas(int Area)
printf("-");
printf("\n");
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
while (fread(&fdb, fdbhdr.recsize, 1, fdb_area->fp) == 1) {
sprintf(flags, "---");
@ -137,7 +137,7 @@ void ListFileAreas(int Area)
}
fsize = fsize / 1024;
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("------------------------------------------------------------");
for (i = 60; i < columns; i++)
printf("-");
@ -161,10 +161,10 @@ void ListFileAreas(int Area)
}
IsDoing("List fileareas");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" Area Files MByte File Group Area name\n");
printf("----- ----- ----- ------------ --------------------------------------------\n");
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
for (i = 1; i <= iAreas; i++) {
fseek(pAreas, ((i-1) * areahdr.recsize) + areahdr.hdrsize, SEEK_SET);
@ -189,7 +189,7 @@ void ListFileAreas(int Area)
}
}
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("----- ----- ----- ---------------------------------------------------------\n");
printf("%5d %5d %5ld \n", iTotal, tcount, tsize);
fclose(pAreas);

View File

@ -52,7 +52,7 @@ void Move(int From, int To, char *File)
struct _fdbarea *src_area = NULL;
IsDoing("Move file");
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
if (From == To) {
WriteError("Area numbers are the same");
@ -172,7 +172,7 @@ void Move(int From, int To, char *File)
}
mbsedb_PackFDB(src_area);
mbsedb_CloseFDB(src_area);
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
Syslog('+', "Move %s from %d to %d %s", File, From, To, rc ? "successfull":"failed");
if (!do_quiet)

View File

@ -57,7 +57,7 @@ void PackFileBase(void)
IsDoing("Pack filebase");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Packing file database...\n");
}

View File

@ -53,7 +53,7 @@ void ReArc(int Area, char *File)
struct _fdbarea *fdb_area = NULL;
IsDoing("ReArc file(s)");
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
/*
* Check area
@ -88,7 +88,7 @@ void ReArc(int Area, char *File)
if ((fdb_area = mbsedb_OpenFDB(Area, 30)) == NULL)
die(MBERR_GENERAL);
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
strcpy(mask, re_mask(File, FALSE));
if (re_comp(mask))
die(MBERR_GENERAL);
@ -105,7 +105,7 @@ void ReArc(int Area, char *File)
* Success, update the file entry
*/
if (!do_quiet) {
colour(9, 0);
mbse_colour(9, 0);
printf("\r Update file %s ", temp);
fflush(stdout);
}
@ -203,7 +203,7 @@ void ReArc(int Area, char *File)
break; // stop when something goes wrong
}
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\r");
for (i = 0; i < (strlen(temp) + 20); i++)
printf(" ");

View File

@ -56,7 +56,7 @@ void SortFileBase(int Area)
IsDoing("Sort filebase");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
}
sprintf(sAreas, "%s/etc/fareas.data", getenv("MBSE_ROOT"));

View File

@ -55,7 +55,7 @@ void ToBeRep(void)
IsDoing("Toberep");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
temp = calloc(PATH_MAX, sizeof(char));
sprintf(temp, "%s/etc/toberep.data", getenv("MBSE_ROOT"));
if ((fp = fopen(temp, "r")) == NULL) {
@ -65,7 +65,7 @@ void ToBeRep(void)
// 12345678901234567890123456789012345678901234567890123456789012345678901234567890
printf(" File echo Group File name Kbyte Date Announce\n");
printf("-------------------- ------------ ------------ ----- ---------- --------\n");
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
while (fread(&rep, sizeof(rep), 1, fp) == 1) {
printf("%-20s %-12s %-12s %5ld %s %s\n",

View File

@ -50,9 +50,9 @@ void ProgName(void)
if (do_quiet)
return;
colour(WHITE, BLACK);
mbse_colour(WHITE, BLACK);
printf("\nMBFILE: MBSE BBS %s File maintenance utility\n", VERSION);
colour(YELLOW, BLACK);
mbse_colour(YELLOW, BLACK);
printf(" %s\n", COPYRIGHT);
}
@ -94,7 +94,7 @@ void die(int onsig)
Syslog(' ', "MBFILE finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
fflush(stdout);
}
ExitClient(onsig);
@ -107,11 +107,11 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(LIGHTCYAN, BLACK);
mbse_colour(LIGHTCYAN, BLACK);
printf("Usage: mbfile [command] <options>\n\n");
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf(" Commands are:\n\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" a adopt <area> <file> [desc] Adopt file to area\n");
printf(" c check [area] Check filebase\n");
printf(" d delete <area> \"<filemask>\" Mark file(s) in area for deletion\n");
@ -125,9 +125,9 @@ void Help(void)
printf(" s sort <area> Sort files in a file area\n");
printf(" t toberep Show toberep database\n");
printf(" u undelete <area> \"<filemask>\" Mark file(s) in area for undeletion\n");
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf("\n Options are:\n\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" -a -announce Suppress announce added files\n");
printf(" -q -quiet Quiet mode\n");
printf(" -v -virus Suppress virus scanning, use with care\n");

View File

@ -73,13 +73,13 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(LIGHTCYAN, BLACK);
mbse_colour(LIGHTCYAN, BLACK);
printf("\nUsage: mbindex <options>\n\n");
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf(" Options are:\n\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf(" -quiet Quiet mode\n");
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
printf("\n");
die(MBERR_COMMANDLINE);
}
@ -94,11 +94,11 @@ void ProgName(void)
if (do_quiet)
return;
colour(WHITE, BLACK);
mbse_colour(WHITE, BLACK);
printf("\nMBINDEX: MBSE BBS %s Nodelist Index Compiler\n", VERSION);
colour(YELLOW, BLACK);
mbse_colour(YELLOW, BLACK);
printf(" %s\n", COPYRIGHT);
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
}
@ -111,7 +111,7 @@ void die(int onsig)
ulockprogram((char *)"mbindex");
if (!do_quiet) {
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
show_log = TRUE;
}
@ -129,7 +129,7 @@ void die(int onsig)
Syslog(' ', "MBINDEX finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet)
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
ExitClient(onsig);
}
@ -144,7 +144,7 @@ int main(int argc,char *argv[])
InitConfig();
InitFidonet();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
t_start = time(NULL);
umask(002);
@ -873,7 +873,7 @@ int nodebld(void)
}
if (!do_quiet) {
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("\n");
}

View File

@ -67,11 +67,11 @@ void ProgName()
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBMSG: MBSE BBS %s - Message Base Maintenance Utility\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
colour(7, 0);
mbse_colour(7, 0);
}
@ -85,7 +85,7 @@ int main(int argc, char **argv)
InitConfig();
TermInit(1, 80, 25);
mbse_TermInit(1, 80, 25);
oldmask = umask(007);
t_start = time(NULL);
@ -159,7 +159,7 @@ int main(int argc, char **argv)
if (!do_quiet) {
printf("\n");
colour(3, 0);
mbse_colour(3, 0);
}
if (do_index || do_link || do_kill || do_pack) {
@ -183,19 +183,19 @@ void Help()
do_quiet = FALSE;
ProgName();
colour(12, 0);
mbse_colour(12, 0);
printf("\n Usage: mbmsg [command(s)] <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
// printf(" i index Create new index files\n");
printf(" l link Link messages by subject\n");
printf(" k kill Kill messages (age & count)\n");
printf(" pa pack Pack deleted messages\n");
printf(" po post <to> <#> <subj> <file> <flavor> Post file in message area #\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -a -area <#> Process area <#> only\n");
printf(" -q -quiet Quiet mode\n");
@ -210,7 +210,7 @@ void die(int onsig)
signal(onsig, SIG_IGN);
if (!do_quiet) {
printf("\r");
colour(3, 0);
mbse_colour(3, 0);
}
if (MsgBase.Locked)
@ -238,7 +238,7 @@ void die(int onsig)
umask(oldmask);
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\r \n");
}
ExitClient(onsig);
@ -284,7 +284,7 @@ void DoMsgBase()
die(MBERR_DISK_FULL);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%5ld .. %-40s", do_area, msgs.Name);
fflush(stdout);
}
@ -314,7 +314,7 @@ void DoMsgBase()
Nopper();
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%5ld .. %-40s", arearec, msgs.Name);
fflush(stdout);
}
@ -351,7 +351,7 @@ void DoMsgBase()
Nopper();
sprintf(Name, "User %s email area: mailbox", usrconfig.Name);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r .. %-40s", Name);
fflush(stdout);
}
@ -447,9 +447,9 @@ void KillArea(char *Path, char *Name, int DaysOld, int MaxMsgs, long Areanr)
if (Msg_Open(Path)) {
if (!do_quiet) {
colour(12, 0);
mbse_colour(12, 0);
printf(" (Killing)");
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
@ -565,7 +565,7 @@ void PackArea(char *Path, long Areanr)
if (Msg_Open(Path)) {
if (!do_quiet) {
colour(12, 0);
mbse_colour(12, 0);
printf(" (Packing)");
fflush(stdout);
}

View File

@ -535,7 +535,7 @@ int Areas(void)
Mgrlog("Process areas taglists");
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Processing areas taglists...\n");
}
@ -552,7 +552,7 @@ int Areas(void)
while ((fread(&mgroup, mgrouphdr.recsize, 1, gp)) == 1) {
if (mgroup.Active && mgroup.AutoChange && strlen(mgroup.AreaFile) && mgroup.UpLink.zone && SearchNode(mgroup.UpLink)) {
if (!do_quiet) {
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("\rEcho group %-12s ", mgroup.Name);
fflush(stdout);
}
@ -573,7 +573,7 @@ int Areas(void)
* Mark areas already present in the taglist.
*/
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf("(check missing areas)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
fflush(stdout);
}
@ -750,7 +750,7 @@ int Areas(void)
while ((fread(&fgroup, fgrouphdr.recsize, 1, gp)) == 1) {
if (fgroup.Active && fgroup.AutoChange && strlen(fgroup.AreaFile) && fgroup.UpLink.zone && SearchNode(fgroup.UpLink)) {
if (!do_quiet) {
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
printf("\r TIC group %-12s ", fgroup.Name);
fflush(stdout);
}
@ -815,7 +815,7 @@ int Areas(void)
* Mark areas already present in the taglist.
*/
if (!do_quiet) {
colour(LIGHTRED, BLACK);
mbse_colour(LIGHTRED, BLACK);
printf("(check missing areas)\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b");
fflush(stdout);
}

View File

@ -62,9 +62,9 @@ int Notify(char *Options)
Syslog('+', "Notify \"%s\"", Options);
if (!do_quiet) {
colour(9, 0);
mbse_colour(9, 0);
printf("Writing notify messages\n");
colour(3, 0);
mbse_colour(3, 0);
}
if (strlen(Options)) {

View File

@ -51,7 +51,7 @@ int Post(char *To, long Area, char *Subj, char *File, char *Flavor)
struct tm *t;
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("Post \"%s\" to \"%s\" in area %ld\n", File, To, Area);
}

View File

@ -91,7 +91,7 @@ int ProcessTic(fa_list *sbl)
Temp = calloc(PATH_MAX, sizeof(char));
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("Checking \b\b\b\b\b\b\b\b\b\b");
fflush(stdout);
}

View File

@ -620,9 +620,9 @@ void flush_queue(void)
IsDoing("Flush queue");
if (!do_quiet) {
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
printf("Flushing outbound queue\n");
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
}
temp = calloc(PATH_MAX, sizeof(char));

View File

@ -543,7 +543,7 @@ void NewsUUCP(void)
IsDoing((char *)"UUCP Batch");
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("Process UUCP Newsbatch\n");
}

View File

@ -148,9 +148,9 @@ void ScanFull()
IsDoing("Scanning mail");
if (!do_quiet) {
colour(9, 0);
mbse_colour(9, 0);
printf("Scanning mail\n");
colour(3, 0);
mbse_colour(3, 0);
fflush(stdout);
}
@ -164,9 +164,9 @@ void ScanFull()
Nopper();
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%8s %-40s", usrconfig.Name, usrconfig.sUserName);
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
@ -228,9 +228,9 @@ void ScanFull()
Nopper();
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%5ld .. %-40s", arearec, msgs.Name);
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
@ -343,9 +343,9 @@ void ScanOne(char *path, unsigned long MsgNum)
IsDoing("Scanning mail");
if (!do_quiet) {
colour(9, 0);
mbse_colour(9, 0);
printf("Scanning mail\n");
colour(3, 0);
mbse_colour(3, 0);
fflush(stdout);
}
@ -396,9 +396,9 @@ void ScanOne(char *path, unsigned long MsgNum)
if ((msgs.Active) && (msgs.Type == ECHOMAIL || msgs.Type == NETMAIL || msgs.Type == NEWS)) {
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%5ld .. %-40s", Area, msgs.Name);
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}
@ -491,9 +491,9 @@ int RescanOne(faddr *L, char *marea, unsigned long Num)
IsDoing("ReScan mail");
if (!do_quiet) {
colour(9, 0);
mbse_colour(9, 0);
printf("ReScan mail\n");
colour(3, 0);
mbse_colour(3, 0);
fflush(stdout);
}
@ -520,9 +520,9 @@ int RescanOne(faddr *L, char *marea, unsigned long Num)
if ((msgs.Active) && ((msgs.Type == ECHOMAIL) || (msgs.Type == NEWS) || (msgs.Type == LIST))) {
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%5ld .. %-40s", Area, msgs.Name);
colour(13, 0);
mbse_colour(13, 0);
fflush(stdout);
}

View File

@ -191,7 +191,7 @@ void ScanNews(void)
}
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("Scan for new news articles\n");
}
@ -216,7 +216,7 @@ void ScanNews(void)
}
Syslog('m', "Scan newsgroup: %s", Msgs.Newsgroup);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%-40s", Msgs.Newsgroup);
fflush(stdout);
}

View File

@ -104,7 +104,7 @@ int storeecho(faddr *f, faddr *t, time_t mdate, int flags, char *subj, char *msg
echo_imp++;
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r%6u => %-40s\r", echo_in, msgs.Name);
fflush(stdout);
}

View File

@ -355,7 +355,7 @@ int LoadTic(char *inb, char *tfn)
* Show on screen what we are doing
*/
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\r");
for (i = 0; i < 79; i++)
printf(" ");

View File

@ -268,7 +268,7 @@ int TossPkt(char *fn)
FILE *pkt;
if (!do_quiet) {
colour(10, 0);
mbse_colour(10, 0);
printf("Tossing packet %s\n", fn);
}

View File

@ -712,7 +712,7 @@ void TestTracker(faddr *dest)
addr.node = dest->node;
addr.point = dest->point;
colour(7, 0);
mbse_colour(7, 0);
Syslog('+', "Test route to %s", aka2str(addr));
rc = TrackMail(addr, &result);

View File

@ -70,7 +70,7 @@ int unpack(char *fn)
int rc = 0, ld;
if (!do_quiet) {
colour(11, 0);
mbse_colour(11, 0);
printf("Unpacking file %s\n", fn);
}

View File

@ -84,15 +84,15 @@ void ShowSysinfo(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "4. SHOW BBS SYSTEM INFO");
mbse_mvprintw( 5, 6, "4. SHOW BBS SYSTEM INFO");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Total calls");
mvprintw( 8, 6, "2. Pots calls");
mvprintw( 9, 6, "3. ISDN calls");
mvprintw(10, 6, "4. Network calls");
mvprintw(11, 6, "5. Local calls");
mvprintw(12, 6, "6. Date started");
mvprintw(13, 6, "7. Last caller");
mbse_mvprintw( 7, 6, "1. Total calls");
mbse_mvprintw( 8, 6, "2. Pots calls");
mbse_mvprintw( 9, 6, "3. ISDN calls");
mbse_mvprintw(10, 6, "4. Network calls");
mbse_mvprintw(11, 6, "5. Local calls");
mbse_mvprintw(12, 6, "6. Date started");
mbse_mvprintw(13, 6, "7. Last caller");
center_addstr(lines - 3, (char *)"Press any key");
IsDoing("View System Info");
@ -104,13 +104,13 @@ void ShowSysinfo(void)
sprintf(buf, "%s", socket_receive());
if (strncmp(buf, "100:7,", 6) == 0) {
cnt = strtok(buf, ",");
mvprintw( 7,26, "%s", strtok(NULL, ","));
mvprintw( 8,26, "%s", strtok(NULL, ","));
mvprintw( 9,26, "%s", strtok(NULL, ","));
mvprintw(10,26, "%s", strtok(NULL, ","));
mvprintw(11,26, "%s", strtok(NULL, ","));
mvprintw(12,26, "%s", strtok(NULL, ","));
mvprintw(13,26, "%s", strtok(NULL, ";"));
mbse_mvprintw( 7,26, "%s", strtok(NULL, ","));
mbse_mvprintw( 8,26, "%s", strtok(NULL, ","));
mbse_mvprintw( 9,26, "%s", strtok(NULL, ","));
mbse_mvprintw(10,26, "%s", strtok(NULL, ","));
mbse_mvprintw(11,26, "%s", strtok(NULL, ","));
mbse_mvprintw(12,26, "%s", strtok(NULL, ","));
mbse_mvprintw(13,26, "%s", strtok(NULL, ";"));
fflush(stdout);
}
}
@ -127,9 +127,9 @@ void ShowLastcaller(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 4, 6, "5. SHOW BBS LASTCALLERS");
mbse_mvprintw( 4, 6, "5. SHOW BBS LASTCALLERS");
set_color(YELLOW, RED);
mvprintw( 6, 1, "Nr Username Location Level Device Time Mins Calls Speed Actions ");
mbse_mvprintw( 6, 1, "Nr Username Location Level Device Time Mins Calls Speed Actions ");
set_color(CYAN, BLACK);
center_addstr(lines - 1, (char *)"Press any key");
IsDoing("View Lastcallers");
@ -160,16 +160,16 @@ void ShowLastcaller(void)
sprintf(buf, "%s", socket_receive());
if (strncmp(buf, "100:9,", 6) == 0) {
cnt = strtok(buf, ",");
mvprintw(y, 1, "%2d", i);
mvprintw(y, 4, "%s", strtok(NULL, ","));
mvprintw(y,19, "%s", strtok(NULL, ","));
mvprintw(y,32, "%s", strtok(NULL, ","));
mvprintw(y,38, "%s", strtok(NULL, ","));
mvprintw(y,45, "%s", strtok(NULL, ","));
mvprintw(y,51, "%s", strtok(NULL, ","));
mvprintw(y,56, "%s", strtok(NULL, ","));
mvprintw(y,62, "%s", strtok(NULL, ","));
mvprintw(y,72, "%s", strtok(NULL, ";"));
mbse_mvprintw(y, 1, "%2d", i);
mbse_mvprintw(y, 4, "%s", strtok(NULL, ","));
mbse_mvprintw(y,19, "%s", strtok(NULL, ","));
mbse_mvprintw(y,32, "%s", strtok(NULL, ","));
mbse_mvprintw(y,38, "%s", strtok(NULL, ","));
mbse_mvprintw(y,45, "%s", strtok(NULL, ","));
mbse_mvprintw(y,51, "%s", strtok(NULL, ","));
mbse_mvprintw(y,56, "%s", strtok(NULL, ","));
mbse_mvprintw(y,62, "%s", strtok(NULL, ","));
mbse_mvprintw(y,72, "%s", strtok(NULL, ";"));
y++;
}
}
@ -189,9 +189,9 @@ void system_moni(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "1. SERVER CLIENTS");
mbse_mvprintw( 5, 6, "1. SERVER CLIENTS");
set_color(YELLOW, RED);
mvprintw( 7, 1, "Pid tty user program city doing time ");
mbse_mvprintw( 7, 1, "Pid tty user program city doing time ");
set_color(CYAN, BLACK);
center_addstr(lines - 1, (char *)"Press any key");
IsDoing("System Monitor");
@ -210,7 +210,7 @@ void system_moni(void)
if (eof == 0) {
if (socket_send(buf) == 0) {
strcpy(buf, socket_receive());
locate(y, 1);
mbse_locate(y, 1);
clrtoeol();
if (strncmp(buf, "100:0;", 6) == 0) {
/*
@ -219,22 +219,22 @@ void system_moni(void)
eof = 1;
} else {
cnt = strtok(buf, ",");
mvprintw(y, 1, (char *)"%.5s", strtok(NULL, ","));
mvprintw(y, 7, (char *)"%.6s", strtok(NULL, ","));
mvprintw(y,14, (char *)"%.8s", strtok(NULL, ","));
mvprintw(y,23, (char *)"%.8s", strtok(NULL, ","));
mvprintw(y,32, (char *)"%.15s", strtok(NULL, ","));
mvprintw(y,48, (char *)"%.26s", strtok(NULL, ","));
mbse_mvprintw(y, 1, (char *)"%.5s", strtok(NULL, ","));
mbse_mvprintw(y, 7, (char *)"%.6s", strtok(NULL, ","));
mbse_mvprintw(y,14, (char *)"%.8s", strtok(NULL, ","));
mbse_mvprintw(y,23, (char *)"%.8s", strtok(NULL, ","));
mbse_mvprintw(y,32, (char *)"%.15s", strtok(NULL, ","));
mbse_mvprintw(y,48, (char *)"%.26s", strtok(NULL, ","));
start = atoi(strtok(NULL, ";"));
now = time(NULL);
mvprintw(y,75, (char *)"%s", t_elapsed(start, now));
mbse_mvprintw(y,75, (char *)"%s", t_elapsed(start, now));
}
}
} else {
/*
* If no valid data, clear line
*/
locate(y, 1);
mbse_locate(y, 1);
clrtoeol();
}
} /* for () */
@ -253,28 +253,28 @@ void system_stat(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "2. SERVER STATISTICS");
mbse_mvprintw( 5, 6, "2. SERVER STATISTICS");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "First date started");
mvprintw( 7,62, "BBS Open");
mvprintw( 8, 6, "Last date started");
mvprintw( 8,62, "ZMH");
mvprintw( 9, 6, "Total server starts");
mvprintw( 9,62, "Internet");
mvprintw(10, 6, "Connected clients");
mvprintw(10,62, "Need inet");
mvprintw(11,62, "Running");
mvprintw(12,30, "Total Today");
mvprintw(12,62, "Load avg");
mbse_mvprintw( 7, 6, "First date started");
mbse_mvprintw( 7,62, "BBS Open");
mbse_mvprintw( 8, 6, "Last date started");
mbse_mvprintw( 8,62, "ZMH");
mbse_mvprintw( 9, 6, "Total server starts");
mbse_mvprintw( 9,62, "Internet");
mbse_mvprintw(10, 6, "Connected clients");
mbse_mvprintw(10,62, "Need inet");
mbse_mvprintw(11,62, "Running");
mbse_mvprintw(12,30, "Total Today");
mbse_mvprintw(12,62, "Load avg");
hor_lin(13,30,8);
hor_lin(13,45,8);
mvprintw(13,62, "Diskspace");
mvprintw(14, 6, "Client connects");
mvprintw(15, 6, "Peak connections");
mvprintw(16, 6, "Protocol syntax errors");
mvprintw(17, 6, "Communication errors");
mvprintw(19, 6, "Next sequence number");
mvprintw(19,62, "Press any key");
mbse_mvprintw(13,62, "Diskspace");
mbse_mvprintw(14, 6, "Client connects");
mbse_mvprintw(15, 6, "Peak connections");
mbse_mvprintw(16, 6, "Protocol syntax errors");
mbse_mvprintw(17, 6, "Communication errors");
mbse_mvprintw(19, 6, "Next sequence number");
mbse_mvprintw(19,62, "Press any key");
IsDoing("System Statistics");
do {
@ -286,37 +286,37 @@ void system_stat(void)
set_color(LIGHTGRAY, BLACK);
cnt = strtok(buf, ",");
now = atoi(strtok(NULL, ","));
mvprintw(7, 30, "%s", ctime(&now));
mbse_mvprintw(7, 30, "%s", ctime(&now));
now = atoi(strtok(NULL, ","));
mvprintw(8, 30, "%s", ctime(&now));
mbse_mvprintw(8, 30, "%s", ctime(&now));
cnt = strtok(NULL, ",");
mvprintw(9, 30, (char *)"%s ", strtok(NULL, ","));
mvprintw(10,30, (char *)"%s ", strtok(NULL, ","));
mvprintw(14,30, (char *)"%s ", strtok(NULL, ","));
mvprintw(15,30, (char *)"%s ", strtok(NULL, ","));
mvprintw(16,30, (char *)"%s ", strtok(NULL, ","));
mvprintw(17,30, (char *)"%s ", strtok(NULL, ","));
mvprintw(14,45, (char *)"%s ", strtok(NULL, ","));
mvprintw(15,45, (char *)"%s ", strtok(NULL, ","));
mvprintw(16,45, (char *)"%s ", strtok(NULL, ","));
mvprintw(17,45, (char *)"%s ", strtok(NULL, ","));
mvprintw(7,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mvprintw(8,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mvprintw(9,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mvprintw(10,72,"%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mvprintw(11,72,"%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mvprintw(12,72, "%s ", strtok(NULL, ","));
mvprintw(19,30, (char *)"%s", strtok(NULL, ";"));
mbse_mvprintw(9, 30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(10,30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(14,30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(15,30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(16,30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(17,30, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(14,45, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(15,45, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(16,45, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(17,45, (char *)"%s ", strtok(NULL, ","));
mbse_mvprintw(7,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mbse_mvprintw(8,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mbse_mvprintw(9,72, "%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mbse_mvprintw(10,72,"%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mbse_mvprintw(11,72,"%s", atoi(strtok(NULL, ",")) == 1?"Yes":"No ");
mbse_mvprintw(12,72, "%s ", strtok(NULL, ","));
mbse_mvprintw(19,30, (char *)"%s", strtok(NULL, ";"));
}
switch (enoughspace(CFG.freespace)) {
case 0: mvprintw(13, 72, "Full ");
case 0: mbse_mvprintw(13, 72, "Full ");
break;
case 1: mvprintw(13, 72, "Ok ");
case 1: mbse_mvprintw(13, 72, "Ok ");
break;
case 2: mvprintw(13, 72, "N/A ");
case 2: mbse_mvprintw(13, 72, "N/A ");
break;
case 3: mvprintw(13, 72, "Error");
case 3: mbse_mvprintw(13, 72, "Error");
break;
}
@ -334,11 +334,11 @@ void disk_stat(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "3. FILESYSTEM USAGE");
mbse_mvprintw( 5, 6, "3. FILESYSTEM USAGE");
set_color(YELLOW, RED);
mvprintw( 7, 1, " Size MB Free MB Used FS-Type St Mountpoint ");
mbse_mvprintw( 7, 1, " Size MB Free MB Used FS-Type St Mountpoint ");
set_color(CYAN, BLACK);
mvprintw(lines - 2, 6, "Press any key");
mbse_mvprintw(lines - 2, 6, "Press any key");
IsDoing("Filesystem Usage");
for (i = 0; i < 10; i++)
last[i] = 0;
@ -371,7 +371,7 @@ void disk_stat(void)
sign = ' ';
last[i] = used;
set_color(CYAN, BLACK);
mvprintw(i+8, 1, "%8lu %8lu ", size, avail);
mbse_mvprintw(i+8, 1, "%8lu %8lu ", size, avail);
set_color(WHITE, BLACK);
printf("%c ", sign);
if (ro == 0) {
@ -389,7 +389,7 @@ void disk_stat(void)
set_color(CYAN, BLACK);
printf(" %-8s %s %-37s", type, ro ?"RO":"RW", fs);
}
locate(i+8, 1);
mbse_locate(i+8, 1);
clrtoeol();
}
}
@ -466,25 +466,25 @@ void Showline(int y, int x, char *msg)
if (strlen(msg)) {
if (msg[0] == '<') {
locate(y, x);
colour(LIGHTCYAN, BLACK);
mbse_locate(y, x);
mbse_colour(LIGHTCYAN, BLACK);
putchar('<');
colour(LIGHTBLUE, BLACK);
mbse_colour(LIGHTBLUE, BLACK);
for (i = 1; i < strlen(msg); i++) {
if (msg[i] == '>') {
colour(LIGHTCYAN, BLACK);
mbse_colour(LIGHTCYAN, BLACK);
putchar(msg[i]);
colour(CYAN, BLACK);
mbse_colour(CYAN, BLACK);
} else {
putchar(msg[i]);
}
}
} else if (msg[0] == '*') {
colour(LIGHTRED, BLACK);
mvprintw(y, x, msg);
mbse_colour(LIGHTRED, BLACK);
mbse_mvprintw(y, x, msg);
} else {
colour(GREEN, BLACK);
mvprintw(y, x, msg);
mbse_colour(GREEN, BLACK);
mbse_mvprintw(y, x, msg);
}
}
}
@ -506,7 +506,7 @@ void DispMsg(char *msg)
* Scroll buffer
*/
for (i = 0; i <= rsize; i++) {
locate(i+4,1);
mbse_locate(i+4,1);
clrtoeol();
sprintf(rbuf[i], "%s", rbuf[i+1]);
Showline(i+4, 1, rbuf[i]);
@ -543,7 +543,7 @@ void Chat(int sysop)
msg = strtok(NULL, "\0");
msg[strlen(msg)-1] = '\0';
set_color(LIGHTRED, BLACK);
mvprintw(4, 1, msg);
mbse_mvprintw(4, 1, msg);
working(2, 0, 0);
working(0, 0, 0);
center_addstr(lines -4, (char *)"Press any key");
@ -552,13 +552,13 @@ void Chat(int sysop)
}
}
locate(lines - 2, 1);
mbse_locate(lines - 2, 1);
set_color(WHITE, BLUE);
clrtoeol();
mvprintw(lines - 2, 2, "Chat, type \"/EXIT\" to exit");
mbse_mvprintw(lines - 2, 2, "Chat, type \"/EXIT\" to exit");
set_color(WHITE, BLACK);
mvprintw(lines - 1, 1, ">");
mbse_mvprintw(lines - 1, 1, ">");
memset(&sbuf, 0, sizeof(sbuf));
memset(&rbuf, 0, sizeof(rbuf));
@ -660,10 +660,10 @@ void Chat(int sysop)
}
curpos = 0;
memset(&sbuf, 0, sizeof(sbuf));
locate(lines - 1, 2);
mbse_locate(lines - 1, 2);
clrtoeol();
set_color(WHITE, BLACK);
mvprintw(lines - 1, 1, ">");
mbse_mvprintw(lines - 1, 1, ">");
}
}
@ -782,16 +782,16 @@ int main(int argc, char *argv[])
IsDoing("Browsing Menu");
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "0. MBSE BBS MONITOR");
mbse_mvprintw( 5, 6, "0. MBSE BBS MONITOR");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. View Server Clients");
mvprintw( 8, 6, "2. View Server Statistics");
mvprintw( 9, 6, "3. View Filesystem Usage");
mvprintw(10, 6, "4. View BBS System Information");
mvprintw(11, 6, "5. View BBS Lastcallers List");
mvprintw(12, 6, "6. Chat with any user");
mvprintw(13, 6, "7. Respond to sysop page");
mvprintw(14, 6, "8. View Software Information");
mbse_mvprintw( 7, 6, "1. View Server Clients");
mbse_mvprintw( 8, 6, "2. View Server Statistics");
mbse_mvprintw( 9, 6, "3. View Filesystem Usage");
mbse_mvprintw(10, 6, "4. View BBS System Information");
mbse_mvprintw(11, 6, "5. View BBS Lastcallers List");
mbse_mvprintw(12, 6, "6. Chat with any user");
mbse_mvprintw(13, 6, "7. Respond to sysop page");
mbse_mvprintw(14, 6, "8. View Software Information");
switch(select_menu(8)) {
case 0:

View File

@ -54,7 +54,7 @@ unsigned char readkey(int y, int x, int fg, int bg)
if ((i % 10) == 0)
show_date(fg, bg, 0, 0);
locate(y, x);
mbse_locate(y, x);
fflush(stdout);
rc = Waitchar(&ch, 5);
if ((rc == 1) && (ch != KEY_ESCAPE))
@ -83,7 +83,7 @@ unsigned char testkey(int y, int x)
unsigned char ch = 0;
Nopper();
locate(y, x);
mbse_locate(y, x);
fflush(stdout);
if ((ttyfd = open("/dev/tty", O_RDWR|O_NONBLOCK)) < 0) {
@ -111,7 +111,7 @@ unsigned char testkey(int y, int x)
void show_field(int y, int x, char *str, int length, int fill)
{
mvprintw(y, x, padleft(str, length, fill));
mbse_mvprintw(y, x, padleft(str, length, fill));
}
@ -122,9 +122,9 @@ void newinsert(int i, int fg, int bg)
insertflag = i;
set_color(YELLOW, RED);
if (insertflag != 0) {
mvprintw(2,36," INS ");
mbse_mvprintw(2,36," INS ");
} else {
mvprintw(2,36," OVR ");
mbse_mvprintw(2,36," OVR ");
}
set_color(fg, bg);
}
@ -147,7 +147,7 @@ char *edit_field(int y, int x, int w, int p, char *s_)
do {
set_color(YELLOW, BLUE);
show_field(y, x, s, w, '_');
locate(y, x + curpos);
mbse_locate(y, x + curpos);
do {
ch = readkey(y, x + curpos, YELLOW, BLUE);
set_color(YELLOW, BLUE);
@ -281,7 +281,7 @@ char *edit_field(int y, int x, int w, int p, char *s_)
} while ((ch != KEY_ENTER) && (ch != KEY_LINEFEED) && (ch != KEY_ESCAPE));
set_color(LIGHTGRAY, BLUE);
mvprintw(2,36, " ");
mbse_mvprintw(2,36, " ");
set_color(LIGHTGRAY, BLACK);
return s;
}
@ -305,10 +305,10 @@ int select_menu(int max)
* Loop forever until it's right.
*/
for (;;) {
mvprintw(lines - 2, 6, "Enter your choice >");
mbse_mvprintw(lines - 2, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(lines - 2, 26, 3, '9', menu);
locate(lines -2, 6);
mbse_locate(lines -2, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0)
@ -342,7 +342,7 @@ void hor_lin(int y, int x, int len)
{
int i;
locate(y, x);
mbse_locate(y, x);
for (i = 0; i < len; i++)
putchar('-');
fflush(stdout);
@ -358,7 +358,7 @@ void set_color(int f, int b)
if ((f != old_f) || (b != old_b)) {
old_f = f;
old_b = b;
colour(f, b);
mbse_colour(f, b);
fflush(stdout);
}
}
@ -382,10 +382,10 @@ void show_date(int fg, int bg, int y, int x)
set_color(LIGHTGREEN, BLUE);
p = ctime(&now);
Striplf(p);
mvprintw(1, columns - 36, (char *)"%s TZUTC %s", p, gmtoffset(now));
mbse_mvprintw(1, columns - 36, (char *)"%s TZUTC %s", p, gmtoffset(now));
p = asctime(gmtime(&now));
Striplf(p);
mvprintw(2, columns - 36, (char *)"%s UTC", p);
mbse_mvprintw(2, columns - 36, (char *)"%s UTC", p);
/*
* Indicator if bbs is free
@ -395,15 +395,15 @@ void show_date(int fg, int bg, int y, int x)
strcpy(buf, SockR("SBBS:0;"));
if (strncmp(buf, "100:2,1", 7) == 0) {
set_color(WHITE, RED);
mvprintw(2,columns - 6, (char *)" Down ");
mbse_mvprintw(2,columns - 6, (char *)" Down ");
} else {
set_color(WHITE, BLUE);
mvprintw(2,columns - 6, (char *)" Free ");
mbse_mvprintw(2,columns - 6, (char *)" Free ");
}
bbs_free = TRUE;
} else {
set_color(WHITE, RED);
mvprintw(2,columns - 6, (char *)" Busy ");
mbse_mvprintw(2,columns - 6, (char *)" Busy ");
bbs_free = FALSE;
}
@ -412,7 +412,7 @@ void show_date(int fg, int bg, int y, int x)
*/
strcpy(buf, SockR("CCKP:0;"));
if (strcmp(buf, "100:0;") == 0) {
locate(3, 1);
mbse_locate(3, 1);
set_color(LIGHTGRAY, BLACK);
clrtoeol();
} else {
@ -424,21 +424,21 @@ void show_date(int fg, int bg, int y, int x)
if (strlen(reason) > 60)
reason[60] = '\0';
locate(3, 1);
mbse_locate(3, 1);
if (strcmp(page, "1")) {
set_color(RED, BLACK);
mvprintw(3, 1, " Old page (%s) %-60s", pid, reason);
mbse_mvprintw(3, 1, " Old page (%s) %-60s", pid, reason);
if ((now % 10) == 0) /* Every 10 seconds */
putchar(7);
} else {
set_color(LIGHTRED, BLACK);
mvprintw(3, 1, " Sysop page (%s) %-60s", pid, reason);
mbse_mvprintw(3, 1, " Sysop page (%s) %-60s", pid, reason);
putchar(7); /* Each second */
}
}
if (y && x)
locate(y, x);
mbse_locate(y, x);
set_color(fg, bg);
}
}
@ -447,7 +447,7 @@ void show_date(int fg, int bg, int y, int x)
void center_addstr(int y, char *s)
{
mvprintw(y, (columns / 2) - (strlen(s) / 2), s);
mbse_mvprintw(y, (columns / 2) - (strlen(s) / 2), s);
}
@ -459,16 +459,16 @@ void screen_start(char *name)
{
int i;
TermInit(1, columns, lines);
mbse_TermInit(1, columns, lines);
/*
* Overwrite screen the first time, if user had it black on white
* it will change to white on black. clear() won't do the trick.
*/
set_color(LIGHTGRAY, BLUE);
locate(1, 1);
mbse_locate(1, 1);
for (i = 0; i < lines; i++) {
if (i == 3)
colour(LIGHTGRAY, BLACK);
mbse_colour(LIGHTGRAY, BLACK);
clrtoeol();
if (i < lines)
printf("\n");
@ -476,10 +476,10 @@ void screen_start(char *name)
fflush(stdout);
set_color(WHITE, BLUE);
locate(1, 1);
mbse_locate(1, 1);
printf((char *)"%s for MBSE BBS version %s", name, VERSION);
set_color(YELLOW, BLUE);
locate(2, 1);
mbse_locate(2, 1);
printf((char *)SHORTRIGHT);
set_color(LIGHTGRAY, BLACK);
show_date(LIGHTGRAY, BLACK, 0, 0);
@ -494,7 +494,7 @@ void screen_start(char *name)
void screen_stop()
{
set_color(LIGHTGRAY, BLACK);
clear();
mbse_clear();
fflush(stdout);
}
@ -521,11 +521,11 @@ void working(int txno, int y, int x)
set_color(LIGHTGRAY, BLACK);
switch (txno) {
case 0: mvprintw(4, columns - 14, (char *)" ");
case 0: mbse_mvprintw(4, columns - 14, (char *)" ");
break;
case 1: mvprintw(4, columns - 14, (char *)"Working . . .");
case 1: mbse_mvprintw(4, columns - 14, (char *)"Working . . .");
break;
case 2: mvprintw(4, columns - 14, (char *)">>> ERROR <<<");
case 2: mbse_mvprintw(4, columns - 14, (char *)">>> ERROR <<<");
for (i = 1; i <= 5; i++) {
putchar(7);
fflush(stdout);
@ -533,12 +533,12 @@ void working(int txno, int y, int x)
}
msleep(550);
break;
case 3: mvprintw(4, columns - 14, (char *)"Form inserted");
case 3: mbse_mvprintw(4, columns - 14, (char *)"Form inserted");
putchar(7);
fflush(stdout);
sleep(1);
break;
case 4: mvprintw(4, columns - 14, (char *)"Form deleted ");
case 4: mbse_mvprintw(4, columns - 14, (char *)"Form deleted ");
putchar(7);
fflush(stdout);
sleep(1);
@ -548,7 +548,7 @@ void working(int txno, int y, int x)
show_date(LIGHTGRAY, BLACK, 0, 0);
set_color(LIGHTGRAY, BLACK);
if (y && x)
locate(y, x);
mbse_locate(y, x);
fflush(stdout);
}
@ -563,7 +563,7 @@ void clr_index()
set_color(LIGHTGRAY, BLACK);
for (i = 4; i <= (lines); i++) {
locate(i, 1);
mbse_locate(i, 1);
clrtoeol();
}
}
@ -578,7 +578,7 @@ void showhelp(char *T)
int f, i, x, forlim;
f = FALSE;
locate(lines, 1);
mbse_locate(lines, 1);
set_color(WHITE, RED);
clrtoeol();
x = 0;

View File

@ -376,7 +376,7 @@ void command_list(char *cmd)
send_nntp("503 Function not available");
msleep(1); /* For the linker only */
colour(0, 0);
mbse_colour(0, 0);
}

View File

@ -78,7 +78,7 @@ void die(int onsig)
ExitClient(onsig);
msleep(1); /* For the linker only */
colour(0, 0);
mbse_colour(0, 0);
}

View File

@ -7,7 +7,7 @@ include ../Makefile.global
SRCS = signature.c filesub.c language.c mbtoberep.c \
msgutil.c oneline.c bbslist.c morefile.c \
email.c fsedit.c lineedit.c mblang.c mbuser.c page.c \
bye.c funcs.c mail.c \
bye.c funcs.c mail.c term.c \
newuser.c pinfo.c timecheck.c change.c \
exitinfo.c mball.c mbsebbs.c menu.c pop3.c lastcallers.c \
timeout.c chat.c file.c mbstat.c misc.c \
@ -16,7 +16,7 @@ SRCS = signature.c filesub.c language.c mbtoberep.c \
HDRS = signature.h filesub.h language.h mbsebbs.h misc.h offline.h \
timeout.h bbslist.h email.h fsedit.h lineedit.h \
mbstat.h msgutil.h oneline.h user.h bye.h morefile.h \
funcs.h mail.h mbuser.h page.h \
funcs.h mail.h mbuser.h page.h term.h \
change.h exitinfo.h mball.h newuser.h \
pinfo.h chat.h file.h menu.h \
pop3.h timecheck.h mbnewusr.h input.h whoson.h \
@ -26,10 +26,10 @@ MBSEBBS_OBJS = signature.o bbslist.o chat.o file.o funcs.o mail.o menu.o \
bye.o change.o mbsebbs.o timeout.o user.o timecheck.o \
exitinfo.o filesub.o lineedit.o offline.o language.o msgutil.o \
pop3.o email.o input.o whoson.o door.o dispfile.o userlist.o timestats.o \
logentry.o morefile.o lastcallers.o
logentry.o morefile.o lastcallers.o term.o
MBSEBBS_LIBS = ../lib/libmbse.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a ../lib/libnodelist.a
MBNEWUSR_OBJS = mbnewusr.o newuser.o language.o timeout.o dispfile.o oneline.o \
timecheck.o input.o exitinfo.o funcs.o misc.o change.o door.o \
timecheck.o input.o exitinfo.o funcs.o misc.o change.o door.o term.o \
filesub.o mail.o email.o msgutil.o pop3.o lineedit.o fsedit.o whoson.o
MBNEWUSR_LIBS = ../lib/libmbse.a ../lib/libmsgbase.a ../lib/libdbase.a ../lib/libmbinet.a ../lib/libnodelist.a
MBALL_OBJS = mball.o
@ -118,46 +118,47 @@ depend:
# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
# Dependencies generated by make depend
signature.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h signature.h funcs.h input.h language.h timeout.h
filesub.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h filesub.h funcs.h language.h input.h misc.h timeout.h exitinfo.h change.h
language.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h
signature.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h signature.h funcs.h input.h language.h timeout.h term.h
filesub.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h filesub.h funcs.h language.h input.h misc.h timeout.h exitinfo.h change.h term.h
language.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h term.h
mbtoberep.o: ../config.h ../lib/mbselib.h
msgutil.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h oneline.h msgutil.h
oneline.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h oneline.h funcs.h input.h language.h
bbslist.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h bbslist.h funcs.h input.h language.h
oneline.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h oneline.h funcs.h input.h language.h term.h
bbslist.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h bbslist.h funcs.h input.h language.h term.h
morefile.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h morefile.h timeout.h
email.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h ../lib/mbinet.h exitinfo.h language.h mail.h timeout.h msgutil.h input.h email.h whoson.h
fsedit.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mail.h input.h language.h timeout.h pinfo.h fsedit.h
lineedit.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mail.h input.h language.h timeout.h lineedit.h
email.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h ../lib/mbinet.h exitinfo.h language.h mail.h timeout.h msgutil.h input.h email.h whoson.h term.h
fsedit.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mail.h input.h language.h timeout.h pinfo.h fsedit.h term.h
lineedit.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mail.h input.h language.h timeout.h lineedit.h term.h
mblang.o: ../config.h ../lib/mbselib.h
mbuser.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbuser.h
page.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h dispfile.h input.h chat.h page.h timeout.h mail.h language.h
bye.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h dispfile.h misc.h language.h bye.h
page.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h dispfile.h input.h chat.h page.h timeout.h mail.h language.h term.h
bye.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h dispfile.h misc.h language.h bye.h term.h
funcs.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h funcs.h
mail.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h misc.h timeout.h oneline.h exitinfo.h lineedit.h fsedit.h filesub.h msgutil.h pop3.h email.h door.h whoson.h
newuser.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h newuser.h language.h timeout.h change.h dispfile.h
pinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h pinfo.h input.h
timecheck.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timecheck.h funcs.h bye.h exitinfo.h language.h input.h
change.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h change.h dispfile.h funcs.h input.h language.h misc.h timeout.h exitinfo.h bye.h
mail.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/nodelist.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h misc.h timeout.h oneline.h exitinfo.h lineedit.h fsedit.h filesub.h msgutil.h pop3.h email.h door.h whoson.h term.h
term.o: ../config.h ../lib/mbselib.h ../lib/users.h term.h
newuser.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h newuser.h language.h timeout.h change.h dispfile.h term.h
pinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h pinfo.h input.h term.h
timecheck.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timecheck.h funcs.h bye.h exitinfo.h language.h input.h term.h
change.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h change.h dispfile.h funcs.h input.h language.h misc.h timeout.h exitinfo.h bye.h term.h
exitinfo.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h language.h oneline.h misc.h bye.h timeout.h timecheck.h exitinfo.h
mball.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h mball.h
mbsebbs.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h mbsebbs.h user.h dispfile.h language.h menu.h misc.h bye.h timeout.h funcs.h
menu.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h oneline.h mail.h bbslist.h change.h chat.h file.h funcs.h input.h misc.h timeout.h menu.h page.h pinfo.h bye.h timecheck.h whoson.h language.h offline.h email.h door.h dispfile.h userlist.h timestats.h logentry.h morefile.h lastcallers.h signature.h
pop3.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbinet.h ../lib/msgtext.h ../lib/msg.h msgutil.h pop3.h
lastcallers.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h lastcallers.h
timeout.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h timeout.h funcs.h bye.h filesub.h language.h
chat.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h chat.h funcs.h input.h language.h misc.h whoson.h
file.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h filesub.h file.h funcs.h input.h language.h misc.h timeout.h exitinfo.h whoson.h change.h dispfile.h
mbsebbs.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h mbsebbs.h user.h dispfile.h language.h menu.h misc.h bye.h timeout.h funcs.h term.h
menu.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h oneline.h mail.h bbslist.h change.h chat.h file.h funcs.h input.h misc.h timeout.h menu.h page.h pinfo.h bye.h timecheck.h whoson.h language.h offline.h email.h door.h dispfile.h userlist.h timestats.h logentry.h morefile.h lastcallers.h signature.h term.h
pop3.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbinet.h ../lib/msgtext.h ../lib/msg.h msgutil.h pop3.h term.h
lastcallers.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h lastcallers.h term.h
timeout.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msg.h timeout.h funcs.h bye.h filesub.h language.h term.h
chat.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h chat.h funcs.h input.h language.h misc.h whoson.h term.h
file.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/mbsedb.h filesub.h file.h funcs.h input.h language.h misc.h timeout.h exitinfo.h whoson.h change.h dispfile.h term.h
mbstat.o: ../config.h ../lib/mbselib.h ../lib/users.h ../lib/mbsedb.h mbstat.h
misc.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h funcs.h input.h language.h misc.h timeout.h exitinfo.h
offline.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/bluewave.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h file.h filesub.h exitinfo.h timeout.h msgutil.h pop3.h offline.h whoson.h
user.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timeout.h user.h dispfile.h funcs.h input.h misc.h bye.h file.h mail.h change.h menu.h exitinfo.h language.h offline.h email.h
mbnewusr.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mbnewusr.h funcs.h input.h language.h misc.h timeout.h newuser.h
input.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h timeout.h language.h
whoson.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h exitinfo.h whoson.h
door.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h language.h input.h timeout.h exitinfo.h whoson.h door.h
dispfile.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h funcs.h language.h oneline.h misc.h timeout.h timecheck.h exitinfo.h mail.h email.h input.h dispfile.h filesub.h
userlist.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h userlist.h language.h input.h timeout.h
timestats.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timestats.h funcs.h language.h input.h exitinfo.h
offline.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/bluewave.h ../lib/msgtext.h ../lib/msg.h mail.h funcs.h input.h language.h file.h filesub.h exitinfo.h timeout.h msgutil.h pop3.h offline.h whoson.h term.h
user.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timeout.h user.h dispfile.h funcs.h input.h misc.h bye.h file.h mail.h change.h menu.h exitinfo.h language.h offline.h email.h term.h
mbnewusr.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h mbnewusr.h funcs.h input.h language.h misc.h timeout.h newuser.h term.h
input.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h timeout.h language.h term.h
whoson.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h input.h language.h exitinfo.h whoson.h term.h
door.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h language.h input.h timeout.h exitinfo.h whoson.h door.h term.h
dispfile.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h ../lib/msgtext.h ../lib/msg.h funcs.h language.h oneline.h misc.h timeout.h timecheck.h exitinfo.h mail.h email.h input.h dispfile.h filesub.h term.h
userlist.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h userlist.h language.h input.h timeout.h term.h
timestats.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h timestats.h funcs.h language.h input.h exitinfo.h term.h
logentry.o: ../config.h ../lib/mbselib.h ../lib/mbse.h ../lib/users.h logentry.h
# End of generated dependencies

View File

@ -39,7 +39,7 @@
#include "funcs.h"
#include "input.h"
#include "language.h"
#include "term.h"
void BBS_Add(void)

View File

@ -37,6 +37,7 @@
#include "misc.h"
#include "language.h"
#include "bye.h"
#include "term.h"
extern pid_t mypid;

View File

@ -41,6 +41,7 @@
#include "timeout.h"
#include "exitinfo.h"
#include "bye.h"
#include "term.h"
int Chg_Language(int NewMode)

View File

@ -38,6 +38,7 @@
#include "language.h"
#include "misc.h"
#include "whoson.h"
#include "term.h"
int chat_with_sysop = FALSE; /* Global sysop chat flag */

View File

@ -46,7 +46,7 @@
#include "input.h"
#include "dispfile.h"
#include "filesub.h"
#include "term.h"
/*

View File

@ -38,6 +38,7 @@
#include "exitinfo.h"
#include "whoson.h"
#include "door.h"
#include "term.h"
extern time_t t_start;

View File

@ -43,7 +43,7 @@
#include "input.h"
#include "email.h"
#include "whoson.h"
#include "term.h"
extern unsigned long LastNum;
extern int Kludges;

View File

@ -44,7 +44,7 @@
#include "whoson.h"
#include "change.h"
#include "dispfile.h"
#include "term.h"
extern long arecno; /* File area number in xxxScan() functions */

View File

@ -41,6 +41,7 @@
#include "timeout.h"
#include "exitinfo.h"
#include "change.h"
#include "term.h"
extern pid_t mypid;

View File

@ -38,6 +38,8 @@
#include "timeout.h"
#include "pinfo.h"
#include "fsedit.h"
#include "term.h"
void Show_Ins(void)
{

View File

@ -35,6 +35,7 @@
#include "input.h"
#include "timeout.h"
#include "language.h"
#include "term.h"

View File

@ -34,7 +34,7 @@
#include "../lib/users.h"
#include "input.h"
#include "language.h"
#include "term.h"

View File

@ -35,7 +35,7 @@
#include "input.h"
#include "language.h"
#include "lastcallers.h"
#include "term.h"
/*

View File

@ -37,6 +37,7 @@
#include "language.h"
#include "timeout.h"
#include "lineedit.h"
#include "term.h"
extern int Line;

View File

@ -58,7 +58,7 @@
#include "email.h"
#include "door.h"
#include "whoson.h"
#include "term.h"
/*

View File

@ -51,9 +51,9 @@ void ProgName()
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBALL: MBSE BBS %s Allfiles Listing Creator\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
}
@ -94,7 +94,7 @@ void die(int onsig)
Syslog(' ', "MBALL finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
}
ExitClient(onsig);
@ -107,18 +107,18 @@ void Help()
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mball [command] <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" l list Create allfiles and newfiles lists\n");
colour(9, 0);
mbse_colour(9, 0);
printf("\n Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -q -quiet Quiet mode\n");
printf(" -z -zip Create .zip archives\n");
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
die(MBERR_COMMANDLINE);
}
@ -132,7 +132,7 @@ int main(int argc, char **argv)
struct passwd *pw;
InitConfig();
TermInit(1, 80, 24);
mbse_TermInit(1, 80, 24);
t_start = time(NULL);
umask(000);
@ -180,7 +180,7 @@ int main(int argc, char **argv)
free(cmd);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\n");
}
@ -285,7 +285,7 @@ void Masterlist()
if(( pAreas = fopen (sAreas, "r")) == NULL) {
WriteError("Can't open File Areas File: %s", sAreas);
colour(7,0);
mbse_colour(7,0);
die(MBERR_GENERAL);
}
fread(&areahdr, sizeof(areahdr), 1, pAreas);

View File

@ -39,6 +39,7 @@
#include "misc.h"
#include "timeout.h"
#include "newuser.h"
#include "term.h"

View File

@ -42,6 +42,7 @@
#include "bye.h"
#include "timeout.h"
#include "funcs.h"
#include "term.h"
#include <locale.h>
#include <langinfo.h>

View File

@ -44,20 +44,20 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mbstat [command] <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" c close Close the BBS for users\n");
printf(" o open Open the BBS for users\n");
printf(" s set semafore Set named semafore\n");
printf(" w wait Wait until the BBS is free\n\n");
colour(9,0);
mbse_colour(9,0);
printf(" Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -q -quiet Quiet, no screen output\n");
colour(7, 0);
mbse_colour(7, 0);
die(MBERR_COMMANDLINE);
}
@ -68,11 +68,11 @@ void ProgName(void)
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBSTAT: MBSE BBS %s Status Changer\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n", COPYRIGHT);
colour(3, 0);
mbse_colour(3, 0);
}
@ -85,7 +85,7 @@ void die(int onsig)
WriteError("Terminated on signal %d", onsig);
if (!do_quiet) {
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
}
@ -108,7 +108,7 @@ int main(int argc, char **argv)
struct passwd *pw;
InitConfig();
TermInit(1, 80, 24);
mbse_TermInit(1, 80, 24);
t_start = time(NULL);
/*
@ -155,7 +155,7 @@ int main(int argc, char **argv)
free(cmd);
if (!do_quiet) {
colour(3, 0);
mbse_colour(3, 0);
printf("\n");
}

View File

@ -52,7 +52,7 @@ int main(int argc, char **argv)
struct passwd *pw;
InitConfig();
TermInit(1, 80, 24);
mbse_TermInit(1, 80, 24);
Days = 0;
Level = 0;
@ -111,7 +111,7 @@ int main(int argc, char **argv)
oldmask = umask(027);
if (!do_quiet)
colour(3, 0);
mbse_colour(3, 0);
UserPack(Days, Level, pack);
umask(oldmask);
@ -120,7 +120,7 @@ int main(int argc, char **argv)
Syslog(' ', "MBUSER finished in %s", t_elapsed(t_start, t_end));
if (!do_quiet)
colour(7, 0);
mbse_colour(7, 0);
ExitClient(MBERR_OK);
return 0;
}
@ -135,11 +135,11 @@ void ProgName(void)
if (do_quiet)
return;
colour(15, 0);
mbse_colour(15, 0);
printf("\nMBUSER: MBSE BBS %s - User maintenance utility\n", VERSION);
colour(14, 0);
mbse_colour(14, 0);
printf(" %s\n\n", COPYRIGHT);
colour(7, 0);
mbse_colour(7, 0);
}
@ -149,19 +149,19 @@ void Help(void)
do_quiet = FALSE;
ProgName();
colour(11, 0);
mbse_colour(11, 0);
printf("\nUsage: mbuser [commands] <options>\n\n");
colour(9, 0);
mbse_colour(9, 0);
printf(" Commands are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" kill [n] [l] Kill users not called in \"n\" days below level \"l\"\n");
printf(" pack Pack the userbase\n");
colour(9, 0);
mbse_colour(9, 0);
printf("\n Options are:\n\n");
colour(3, 0);
mbse_colour(3, 0);
printf(" -quiet Quiet mode, (no screen output)\n\n");
colour(7, 0);
mbse_colour(7, 0);
printf("\n");
ExitClient(MBERR_COMMANDLINE);
}

View File

@ -59,6 +59,7 @@
#include "morefile.h"
#include "lastcallers.h"
#include "signature.h"
#include "term.h"
extern pid_t mypid;

View File

@ -40,6 +40,7 @@
#include "timeout.h"
#include "change.h"
#include "dispfile.h"
#include "term.h"
/*

View File

@ -47,7 +47,7 @@
#include "pop3.h"
#include "offline.h"
#include "whoson.h"
#include "term.h"
long Total, TotalPersonal, Current, Personal;

View File

@ -36,6 +36,7 @@
#include "funcs.h"
#include "input.h"
#include "language.h"
#include "term.h"
char sOneliner[81];

View File

@ -40,6 +40,7 @@
#include "timeout.h"
#include "mail.h"
#include "language.h"
#include "term.h"
extern pid_t mypid;

View File

@ -34,7 +34,7 @@
#include "../lib/users.h"
#include "pinfo.h"
#include "input.h"
#include "term.h"
void ls(int a)

View File

@ -37,7 +37,7 @@
#include "../lib/msg.h"
#include "msgutil.h"
#include "pop3.h"
#include "term.h"
void error_popmail(char *);

View File

@ -37,6 +37,7 @@
#include "input.h"
#include "language.h"
#include "timeout.h"
#include "term.h"
#define MAXSIGLINES 4

249
mbsebbs/term.c Normal file
View File

@ -0,0 +1,249 @@
/*****************************************************************************
*
* $Id$
* Purpose ...............: Terminal output routines.
*
*****************************************************************************
* Copyright (C) 1997-2004
*
* Michiel Broek FIDO: 2:280/2802
* Beekmansbos 10
* 1971 BV IJmuiden
* the Netherlands
*
* This file is part of MBSE BBS.
*
* This BBS is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2, or (at your option) any
* later version.
*
* MBSE BBS is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with MBSE BBS; see the file COPYING. If not, write to the Free
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
*****************************************************************************/
#include "../config.h"
#include "../lib/mbselib.h"
#include "../lib/users.h"
#include "term.h"
int termmode; /* 0 = tty, 1 = ANSI */
int termx = 80;
int termy = 24;
void TermInit(int mode, int x, int y)
{
termmode = mode;
termx = x;
termy = y;
}
/*
* Function will print about of enters specified
*/
void Enter(int num)
{
int i;
for (i = 0; i < num; i++)
fprintf(stdout, "\n");
fflush(stdout);
}
void pout(int fg, int bg, char *Str)
{
colour(fg, bg);
fprintf(stdout, Str);
fflush(stdout);
}
void poutCenter(int fg, int bg, char *Str)
{
colour(fg, bg);
Center(Str);
}
void poutCR(int fg, int bg, char *Str)
{
colour(fg, bg);
fputs(Str, stdout);
fprintf(stdout, "\n");
fflush(stdout);
}
/*
* Changes ansi background and foreground color
*/
void colour(int fg, int bg)
{
if (termmode == 1) {
int att=0, fore=37, back=40;
if (fg<0 || fg>31 || bg<0 || bg>7) {
fprintf(stdout, "ANSI: Illegal colour specified: %i, %i\n", fg, bg);
fflush(stdout);
return;
}
fprintf(stdout, "[");
if ( fg > WHITE) {
fprintf(stdout, "5;");
fg-= 16;
}
if (fg > LIGHTGRAY) {
att=1;
fg=fg-8;
}
if (fg == BLACK) fore=30;
else if (fg == BLUE) fore=34;
else if (fg == GREEN) fore=32;
else if (fg == CYAN) fore=36;
else if (fg == RED) fore=31;
else if (fg == MAGENTA) fore=35;
else if (fg == BROWN) fore=33;
else fore=37;
if (bg == BLUE) back=44;
else if (bg == GREEN) back=42;
else if (bg == CYAN) back=46;
else if (bg == RED) back=41;
else if (bg == MAGENTA) back=45;
else if (bg == BROWN) back=43;
else if (bg == LIGHTGRAY) back=47;
else back=40;
fprintf(stdout, "%d;%d;%dm", att, fore, back);
fflush(stdout);
}
}
void Center(char *string)
{
int Strlen;
int Maxlen = termx;
int i, x, z;
char *Str;
Str = calloc(1024, sizeof(char));
Strlen = strlen(string);
if (Strlen == Maxlen)
fprintf(stdout, "%s\n", string);
else {
x = Maxlen - Strlen;
z = x / 2;
for (i = 0; i < z; i++)
strcat(Str, " ");
strcat(Str, string);
fprintf(stdout, "%s\n", Str);
}
fflush(stdout);
free(Str);
}
void clear()
{
if (termmode == 1) {
colour(LIGHTGRAY, BLACK);
fprintf(stdout, ANSI_HOME);
fprintf(stdout, ANSI_CLEAR);
fflush(stdout);
} else
Enter(1);
}
/*
* Moves cursor to specified position
*/
void locate(int y, int x)
{
if (termmode > 0) {
if (y > termy || x > termx) {
fprintf(stdout, "ANSI: Invalid screen coordinates: %i, %i\n", y, x);
fflush(stdout);
return;
}
fprintf(stdout, "\x1B[%i;%iH", y, x);
fflush(stdout);
}
}
void fLine(int Len)
{
int x;
if (termmode == 0)
for (x = 0; x < Len; x++)
fprintf(stdout, "-");
if (termmode == 1)
for (x = 0; x < Len; x++)
fprintf(stdout, "%c", 196);
fprintf(stdout, " \n");
fflush(stdout);
}
void sLine()
{
fLine(termx -1);
}
/*
* curses compatible functions
*/
void mvprintw(int y, int x, const char *format, ...)
{
char *outputstr;
va_list va_ptr;
outputstr = calloc(2048, sizeof(char));
va_start(va_ptr, format);
vsprintf(outputstr, format, va_ptr);
va_end(va_ptr);
locate(y, x);
fprintf(stdout, outputstr);
free(outputstr);
fflush(stdout);
}

18
mbsebbs/term.h Normal file
View File

@ -0,0 +1,18 @@
#ifndef _TERM_H
#define _TERM_H
void TermInit(int, int, int);
void Enter(int);
void pout(int, int, char *);
void poutCR(int, int, char *);
void poutCenter(int,int,char *);
void colour(int, int);
void Center(char *);
void clear(void);
void locate(int, int);
void fLine(int);
void sLine(void);
void mvprintw(int, int, const char *, ...);
#endif

View File

@ -38,6 +38,7 @@
#include "exitinfo.h"
#include "language.h"
#include "input.h"
#include "term.h"
extern pid_t mypid; /* Pid of this program */

View File

@ -38,6 +38,7 @@
#include "bye.h"
#include "filesub.h"
#include "language.h"
#include "term.h"
extern int e_pid; /* Pid of external program */

View File

@ -37,7 +37,7 @@
#include "language.h"
#include "input.h"
#include "exitinfo.h"
#include "term.h"
void TimeStats()

View File

@ -49,7 +49,7 @@
#include "language.h"
#include "offline.h"
#include "email.h"
#include "term.h"
extern int sock;

View File

@ -36,7 +36,7 @@
#include "language.h"
#include "input.h"
#include "timeout.h"
#include "term.h"
void UserList(char *OpData)

View File

@ -36,6 +36,7 @@
#include "language.h"
#include "exitinfo.h"
#include "whoson.h"
#include "term.h"
extern int LC_Download, LC_Upload, LC_Read, LC_Chat, LC_Olr, LC_Door;

View File

@ -123,7 +123,7 @@ int E_Group(gr_list **fdp, char *title)
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 6, (char *)"%s", title);
mbse_mvprintw(5, 6, (char *)"%s", title);
set_color(CYAN, BLACK);
for (tmp = *fdp; tmp; tmp = tmp->next)
@ -139,9 +139,9 @@ int E_Group(gr_list **fdp, char *title)
j++;
if ((j >= (o + 1)) && (j < (o + 41))) {
if (tmp->tagged)
mvprintw(y, x, (char *)"%2d. + %s", j, tmp->group);
mbse_mvprintw(y, x, (char *)"%2d. + %s", j, tmp->group);
else
mvprintw(y, x, (char *)"%2d. %s", j, tmp->group);
mbse_mvprintw(y, x, (char *)"%2d. %s", j, tmp->group);
y++;
if (y == 17) {
y = 7;
@ -159,7 +159,7 @@ int E_Group(gr_list **fdp, char *title)
case -2:if ((o - 40) >= 0) {
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 5, (char *)"%s", title);
mbse_mvprintw(5, 5, (char *)"%s", title);
set_color(CYAN, BLACK);
o -= 40;
}
@ -167,7 +167,7 @@ int E_Group(gr_list **fdp, char *title)
case -1:if ((o + 40) < n) {
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 5, (char *)"%s", title);
mbse_mvprintw(5, 5, (char *)"%s", title);
set_color(CYAN, BLACK);
o += 40;
}
@ -197,7 +197,7 @@ int E_Group(gr_list **fdp, char *title)
o = ((i -1) / 40) * 40;
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 5, (char *)"%s", title);
mbse_mvprintw(5, 5, (char *)"%s", title);
set_color(CYAN, BLACK);
}
}

View File

@ -50,13 +50,13 @@ int yes_no(char *T_)
strcpy(t, T_);
strcat(t, " Y/n ");
set_color(LIGHTGRAY, BLACK);
locate(LINES - 3, 1);
mbse_locate(LINES - 3, 1);
clrtoeol();
mvprintw(LINES -3, 6, t);
mbse_mvprintw(LINES -3, 6, t);
do {
ch = toupper(readkey(LINES - 3, strlen(t) + 6, LIGHTGRAY, BLACK));
} while (ch != KEY_ENTER && ch != 'Y' && ch != 'N' && ch != '\012');
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (ch == KEY_ENTER || ch == 'Y' || ch == KEY_LINEFEED)
return 1;
@ -80,12 +80,12 @@ void errmsg(const char *format, ...)
t = xstrcat(t, (char *)", Press any key ");
set_color(LIGHTGRAY, BLACK);
locate(LINES - 3, 1);
mbse_locate(LINES - 3, 1);
clrtoeol();
mvprintw(LINES - 3, 6, t);
mbse_mvprintw(LINES - 3, 6, t);
putchar(7);
ch = readkey(LINES - 3, strlen(t) + 6, LIGHTGRAY, BLACK);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
free(t);
}
@ -140,7 +140,7 @@ void show_field(int y, int x, char *str, int length, int fill)
{
int i;
locate(y, x);
mbse_locate(y, x);
for (i = 0; i < strlen(str); i++)
putchar(str[i]);
if (strlen(str) < length)
@ -157,9 +157,9 @@ void newinsert(int i, int fg, int bg)
insertflag = i;
set_color(YELLOW, RED);
if (insertflag != 0) {
mvprintw(2,36," INS ");
mbse_mvprintw(2,36," INS ");
} else {
mvprintw(2,36," OVR ");
mbse_mvprintw(2,36," OVR ");
}
set_color(fg, bg);
}
@ -182,7 +182,7 @@ char *edit_field(int y, int x, int w, int p, char *s_)
do {
set_color(YELLOW, BLUE);
show_field(y, x, s, w, '_');
locate(y, x + curpos);
mbse_locate(y, x + curpos);
do {
ch = readkey(y, x + curpos, YELLOW, BLUE);
set_color(YELLOW, BLUE);
@ -314,7 +314,7 @@ char *edit_field(int y, int x, int w, int p, char *s_)
} while ((ch != KEY_ENTER) && (ch != KEY_LINEFEED) && (ch != KEY_ESCAPE));
set_color(LIGHTGRAY, BLUE);
mvprintw(2,36, " ");
mbse_mvprintw(2,36, " ");
set_color(LIGHTGRAY, BLACK);
if (strlen(s)) {
AllSpaces = TRUE;
@ -351,10 +351,10 @@ char *select_show(int max)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0)
@ -396,10 +396,10 @@ char *select_record(int max, int items)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "A", 1) == 0)
@ -448,10 +448,10 @@ char *select_area(int max, int items)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "A", 1) == 0)
@ -500,10 +500,10 @@ char *select_filearea(int max, int items)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "A", 1) == 0)
@ -550,10 +550,10 @@ char *select_pick(int max, int items)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0)
@ -598,10 +598,10 @@ char *select_aka(int max, int items)
* Loop until the answer is right
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 6, '!', menu);
locate(LINES - 3, 6);
mbse_locate(LINES - 3, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0)
@ -669,10 +669,10 @@ int select_menu_sub(int max, int items, int allowall, char *hlp)
* Loop forever until it's right.
*/
for (;;) {
mvprintw(LINES - 3, 6, "Enter your choice >");
mbse_mvprintw(LINES - 3, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 3, 26, 3, '!', menu);
locate(LINES -3, 6);
mbse_locate(LINES -3, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0)
@ -886,7 +886,7 @@ char *getboolean(int val)
void show_bool(int y, int x, int val)
{
mvprintw(y, x, getboolean(val));
mbse_mvprintw(y, x, getboolean(val));
}
@ -964,31 +964,31 @@ long edit_logl(long val, char *txt)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 5, (char *)"%s EDIT LOGLEVEL", txt);
mbse_mvprintw(5, 5, (char *)"%s EDIT LOGLEVEL", txt);
set_color(CYAN, BLACK);
mvprintw( 5,45, "Logflags");
mbse_mvprintw( 5,45, "Logflags");
mvprintw( 7, 5, "1. ! Attention");
mvprintw( 8, 5, "2. + Normal");
mvprintw( 9, 5, "3. - Verbose");
mvprintw(10, 5, "4. A Debug TCP");
mvprintw(11, 5, "5. B Debug BBS/binkp");
mvprintw(12, 5, "6. C Chat modems");
mvprintw(13, 5, "7. D Device IO");
mvprintw(14, 5, "8. E Execute");
mvprintw(15, 5, "9. F File forward");
mvprintw(16, 5, "10. H Hydra debug");
mvprintw(17, 5, "11. I EMSI debug");
mvprintw( 7,45, "12. L Locking");
mvprintw( 8,45, "13. M Mail/News");
mvprintw( 9,45, "14. N Nodelist");
mvprintw(10,45, "15. O Outboundscan");
mvprintw(11,45, "16. P Packing");
mvprintw(12,45, "17. R Routing");
mvprintw(13,45, "18. S Session");
mvprintw(14,45, "19. T TTY debug");
mvprintw(15,45, "20. X Xmodem debug");
mvprintw(16,45, "21. Z Zmodem debug");
mbse_mvprintw( 7, 5, "1. ! Attention");
mbse_mvprintw( 8, 5, "2. + Normal");
mbse_mvprintw( 9, 5, "3. - Verbose");
mbse_mvprintw(10, 5, "4. A Debug TCP");
mbse_mvprintw(11, 5, "5. B Debug BBS/binkp");
mbse_mvprintw(12, 5, "6. C Chat modems");
mbse_mvprintw(13, 5, "7. D Device IO");
mbse_mvprintw(14, 5, "8. E Execute");
mbse_mvprintw(15, 5, "9. F File forward");
mbse_mvprintw(16, 5, "10. H Hydra debug");
mbse_mvprintw(17, 5, "11. I EMSI debug");
mbse_mvprintw( 7,45, "12. L Locking");
mbse_mvprintw( 8,45, "13. M Mail/News");
mbse_mvprintw( 9,45, "14. N Nodelist");
mbse_mvprintw(10,45, "15. O Outboundscan");
mbse_mvprintw(11,45, "16. P Packing");
mbse_mvprintw(12,45, "17. R Routing");
mbse_mvprintw(13,45, "18. S Session");
mbse_mvprintw(14,45, "19. T TTY debug");
mbse_mvprintw(15,45, "20. X Xmodem debug");
mbse_mvprintw(16,45, "21. Z Zmodem debug");
for (;;) {
set_color(WHITE, BLACK);
@ -1048,8 +1048,8 @@ long edit_logl(long val, char *txt)
void show_int(int y, int x, int val)
{
mvprintw(y, x, (char *)" ");
mvprintw(y, x, (char *)"%d", val);
mbse_mvprintw(y, x, (char *)" ");
mbse_mvprintw(y, x, (char *)"%d", val);
}
@ -1093,7 +1093,7 @@ int edit_int_range(int y, int x, int val, int min, int max, char *help)
void show_ushort(int y, int x, unsigned short val)
{
mvprintw(y, x, (char *)"%d", val);
mbse_mvprintw(y, x, (char *)"%d", val);
}
@ -1207,7 +1207,7 @@ char *getflag(unsigned long flag, unsigned long not)
void show_sec(int y, int x, securityrec sec)
{
show_int(y, x, sec.level);
mvprintw(y, x + 6, getflag(sec.flags, sec.notflags));
mbse_mvprintw(y, x + 6, getflag(sec.flags, sec.notflags));
}
@ -1221,7 +1221,7 @@ securityrec edit_sec(int y, int x, securityrec sec, char *shdr)
clr_index();
set_color(WHITE, BLACK);
mvprintw(4,3,shdr);
mbse_mvprintw(4,3,shdr);
set_color(CYAN, BLACK);
xx = 3;
yy = 6;
@ -1236,10 +1236,10 @@ securityrec edit_sec(int y, int x, securityrec sec, char *shdr)
yy = 6;
}
set_color(CYAN,BLACK);
mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.fname[i]);
mbse_mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.fname[i]);
yy++;
}
mvprintw(16,53, "33. Security level");
mbse_mvprintw(16,53, "33. Security level");
for (;;) {
set_color(WHITE, BLACK);
@ -1265,7 +1265,7 @@ securityrec edit_sec(int y, int x, securityrec sec, char *shdr)
*/
if (((sec.flags >> i) & 1) && ((sec.notflags >> i) & 1))
c = '!';
mvprintw(yy,xx,(char *)"%c", c);
mbse_mvprintw(yy,xx,(char *)"%c", c);
yy++;
}
show_int(16,74, sec.level);
@ -1304,7 +1304,7 @@ securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
clr_index();
set_color(WHITE, BLACK);
mvprintw(4,3,shdr);
mbse_mvprintw(4,3,shdr);
set_color(CYAN, BLACK);
xx = 3;
yy = 6;
@ -1319,10 +1319,10 @@ securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
yy = 6;
}
set_color(CYAN,BLACK);
mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.fname[i]);
mbse_mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.fname[i]);
yy++;
}
mvprintw(16,53, "33. Security level");
mbse_mvprintw(16,53, "33. Security level");
for (;;) {
set_color(WHITE, BLACK);
@ -1348,7 +1348,7 @@ securityrec edit_usec(int y, int x, securityrec sec, char *shdr)
*/
if (((sec.flags >> i) & 1) && ((sec.notflags >> i) & 1))
c = '!';
mvprintw(yy,xx,(char *)"%c", c);
mbse_mvprintw(yy,xx,(char *)"%c", c);
yy++;
}
show_int(16,74, sec.level);
@ -1382,7 +1382,7 @@ securityrec edit_asec(securityrec sec, char *shdr)
clr_index();
set_color(WHITE, BLACK);
mvprintw(4,3,shdr);
mbse_mvprintw(4,3,shdr);
set_color(CYAN, BLACK);
xx = 3;
yy = 6;
@ -1397,7 +1397,7 @@ securityrec edit_asec(securityrec sec, char *shdr)
yy = 6;
}
set_color(CYAN,BLACK);
mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.aname[i]);
mbse_mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.aname[i]);
yy++;
}
@ -1425,7 +1425,7 @@ securityrec edit_asec(securityrec sec, char *shdr)
*/
if (((sec.flags >> i) & 1) && ((sec.notflags >> i) & 1))
c = '!';
mvprintw(yy,xx,(char *)"%c", c);
mbse_mvprintw(yy,xx,(char *)"%c", c);
yy++;
}
@ -1459,7 +1459,7 @@ securityrec edit_nsec(securityrec sec, char *shdr)
clr_index();
set_color(WHITE, BLACK);
mvprintw(4,3,shdr);
mbse_mvprintw(4,3,shdr);
set_color(CYAN, BLACK);
xx = 3;
yy = 6;
@ -1474,7 +1474,7 @@ securityrec edit_nsec(securityrec sec, char *shdr)
yy = 6;
}
set_color(CYAN,BLACK);
mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.aname[i]);
mbse_mvprintw(yy, xx, (char *)"%2d. %-16s", i+1, CFG.aname[i]);
yy++;
}
@ -1502,7 +1502,7 @@ securityrec edit_nsec(securityrec sec, char *shdr)
*/
if (((sec.flags >> i) & 1) && ((sec.notflags >> i) & 1))
c = '!';
mvprintw(yy,xx,(char *)"%c", c);
mbse_mvprintw(yy,xx,(char *)"%c", c);
yy++;
}
@ -1549,7 +1549,7 @@ char *getmsgtype(int val)
void show_msgtype(int y, int x, int val)
{
mvprintw(y, x, getmsgtype(val));
mbse_mvprintw(y, x, getmsgtype(val));
}
@ -1594,7 +1594,7 @@ char *getemailmode(int val)
void show_emailmode(int y, int x, int val)
{
mvprintw(y, x, getemailmode(val));
mbse_mvprintw(y, x, getemailmode(val));
}
@ -1641,7 +1641,7 @@ char *getmsgkinds(int val)
void show_msgkinds(int y, int x, int val)
{
mvprintw(y, x, getmsgkinds(val));
mbse_mvprintw(y, x, getmsgkinds(val));
}
@ -1686,7 +1686,7 @@ char *getlinetype(int val)
void show_linetype(int y, int x, int val)
{
mvprintw(y, x, getlinetype(val));
mbse_mvprintw(y, x, getlinetype(val));
}
@ -1730,7 +1730,7 @@ char *getservice(int val)
void show_service(int y, int x, int val)
{
mvprintw(y, x, getservice(val));
mbse_mvprintw(y, x, getservice(val));
}
@ -1774,7 +1774,7 @@ char *getnewsmode(int val)
void show_newsmode(int y, int x, int val)
{
mvprintw(y, x, getnewsmode(val));
mbse_mvprintw(y, x, getnewsmode(val));
}
@ -1818,7 +1818,7 @@ char *getmsgeditor(int val)
void show_msgeditor(int y, int x, int val)
{
mvprintw(y, x, getmsgeditor(val));
mbse_mvprintw(y, x, getmsgeditor(val));
}
@ -1851,7 +1851,7 @@ int edit_msgeditor(int y, int x, int val)
void show_magictype(int y, int x, int val)
{
mvprintw(y, x, getmagictype(val));
mbse_mvprintw(y, x, getmagictype(val));
}
@ -1915,7 +1915,7 @@ char *get_asktype(int val)
void show_asktype(int y, int x, int val)
{
mvprintw(y, x, get_asktype(val));
mbse_mvprintw(y, x, get_asktype(val));
}
@ -1959,7 +1959,7 @@ char *get_sessiontype(int val)
void show_sessiontype(int y, int x, int val)
{
mvprintw(y, x, get_sessiontype(val));
mbse_mvprintw(y, x, get_sessiontype(val));
}
@ -2007,7 +2007,7 @@ char *get_routetype(int val)
void show_routetype(int y, int x, int val)
{
mvprintw(y, x, get_routetype(val));
mbse_mvprintw(y, x, get_routetype(val));
}
@ -2046,7 +2046,7 @@ void show_aka(int y, int x, fidoaddr aka)
sprintf(temp, "%d:%d/%d@%s", aka.zone, aka.net, aka.node, aka.domain);
else
sprintf(temp, "%d:%d/%d.%d@%s", aka.zone, aka.net, aka.node, aka.point, aka.domain);
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
}
@ -2058,14 +2058,14 @@ void edit_color(int *fg, int *bg, char *title, char *help)
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 6, title);
mbse_mvprintw(5, 6, title);
sprintf(temp, "Change the ^%s^ color with arrow keys, press <Enter> whene done", help);
showhelp(temp);
for (f = 0; f < 16; f++)
for (b = 0; b < 8; b++) {
set_color(f, b);
mvprintw(b + 9, f + 33, ".");
mbse_mvprintw(b + 9, f + 33, ".");
}
f = (*fg) & 15;
@ -2073,11 +2073,11 @@ void edit_color(int *fg, int *bg, char *title, char *help)
for (;;) {
set_color(f, b);
mvprintw(7, 6, "This is an example...");
mbse_mvprintw(7, 6, "This is an example...");
fflush(stdout);
mvprintw(b + 9, f + 33, "*");
mbse_mvprintw(b + 9, f + 33, "*");
ch = readkey(7,28, f, b);
mvprintw(b + 9, f + 33, ".");
mbse_mvprintw(b + 9, f + 33, ".");
switch(ch) {
case KEY_LINEFEED:
case KEY_ENTER: (* fg) = f;

View File

@ -98,7 +98,7 @@ int edit_charset(int, int, int);
#define E_INT(y,x,value,help) value = edit_int(y,x,value,(char *)help); break;
#define E_IRC(y,x,value,min,max,help) value = edit_int_range(y,x,value,min,max,(char *)help); break;
#define E_LOGL(grade,txt,af) grade = edit_logl(grade,(char *)txt); af(); break;
#define S_COL(y,x,name,fg,bg) set_color(fg,bg); mvprintw(y,x,name);
#define S_COL(y,x,name,fg,bg) set_color(fg,bg); mbse_mvprintw(y,x,name);
#define E_SEC(y,x,sec,hdr,af) sec = edit_sec(y,x,sec,(char *)hdr); af(); break;
#define E_USEC(y,x,sec,hdr,af) sec = edit_usec(y,x,sec,(char *)hdr); af(); break;

View File

@ -535,20 +535,20 @@ int EditArchRec(int Area)
crc = upd_crc32((char *)&archiver, crc, sizeof(archiver));
set_color(WHITE, BLACK);
mvprintw( 5, 2, "3. EDIT ARCHIVER");
mbse_mvprintw( 5, 2, "3. EDIT ARCHIVER");
set_color(CYAN, BLACK);
mvprintw( 7, 2, "1. Comment");
mvprintw( 8, 2, "2. Name");
mvprintw( 9, 2, "3. Available");
mvprintw(10, 2, "4. Deleted");
mvprintw(11, 2, "5. Arc files");
mvprintw(12, 2, "6. Arc mail");
mvprintw(13, 2, "7. Banners");
mvprintw(14, 2, "8. Arc test");
mvprintw(15, 2, "9. Un. files");
mvprintw(16, 2, "10. Un. mail");
mvprintw(17, 2, "11. FILE_ID");
mvprintw(18, 2, "12. List arc");
mbse_mvprintw( 7, 2, "1. Comment");
mbse_mvprintw( 8, 2, "2. Name");
mbse_mvprintw( 9, 2, "3. Available");
mbse_mvprintw(10, 2, "4. Deleted");
mbse_mvprintw(11, 2, "5. Arc files");
mbse_mvprintw(12, 2, "6. Arc mail");
mbse_mvprintw(13, 2, "7. Banners");
mbse_mvprintw(14, 2, "8. Arc test");
mbse_mvprintw(15, 2, "9. Un. files");
mbse_mvprintw(16, 2, "10. Un. mail");
mbse_mvprintw(17, 2, "11. FILE_ID");
mbse_mvprintw(18, 2, "12. List arc");
for (;;) {
set_color(WHITE, BLACK);
@ -636,7 +636,7 @@ void EditArchive(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "3. ARCHIVER SETUP");
mbse_mvprintw( 5, 4, "3. ARCHIVER SETUP");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/archiver.temp", getenv("MBSE_ROOT"));
@ -660,7 +660,7 @@ void EditArchive(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-5s %-26s", i, archiver.name, archiver.comment);
temp[38] = 0;
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}
@ -737,7 +737,7 @@ char *PickArchive(char *shdr)
clr_index();
set_color(WHITE, BLACK);
sprintf(temp, "%s. ARCHIVER SELECT", shdr);
mvprintw( 5, 4, temp);
mbse_mvprintw( 5, 4, temp);
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/archiver.data", getenv("MBSE_ROOT"));
@ -760,7 +760,7 @@ char *PickArchive(char *shdr)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-32s", i, archiver.comment);
temp[37] = 0;
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
strcpy(pick, select_pick(records, 20));

View File

@ -51,15 +51,15 @@ void bbs_menu(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "8. BBS SETUP");
mbse_mvprintw( 5, 6, "8. BBS SETUP");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Edit Security Limits");
mvprintw( 8, 6, "2. Edit Language Setup");
mvprintw( 9, 6, "3. Edit BBS Menus");
mvprintw(10, 6, "4. Edit File Areas");
mvprintw(11, 6, "5. Edit Transfer Protocols");
mvprintw(12, 6, "6. Edit BBS List Data");
mvprintw(13, 6, "7. Edit Oneliners");
mbse_mvprintw( 7, 6, "1. Edit Security Limits");
mbse_mvprintw( 8, 6, "2. Edit Language Setup");
mbse_mvprintw( 9, 6, "3. Edit BBS Menus");
mbse_mvprintw(10, 6, "4. Edit File Areas");
mbse_mvprintw(11, 6, "5. Edit Transfer Protocols");
mbse_mvprintw(12, 6, "6. Edit BBS List Data");
mbse_mvprintw(13, 6, "7. Edit Oneliners");
switch(select_menu(7)) {
case 0: return;

View File

@ -218,28 +218,28 @@ int EditBBSlistRec(int Area)
crc = upd_crc32((char *)&bbs, crc, sizeof(bbs));
set_color(WHITE, BLACK);
mvprintw( 4, 1, "8.6.1 EDIT BBSLIST");
mbse_mvprintw( 4, 1, "8.6.1 EDIT BBSLIST");
set_color(CYAN, BLACK);
mvprintw( 6, 1, " 1. BBS");
mvprintw( 7, 1, " 2. Desc.");
mvprintw( 8, 1, " 3. Desc.");
mvprintw( 9, 1, " 4. Phn 1");
mvprintw(10, 1, " 5. Phn 2");
mvprintw(11, 1, " 6. Phn 3");
mvprintw(12, 1, " 7. Phn 4");
mvprintw(13, 1, " 8. Phn 5");
mvprintw(14, 1, " 9. TCPIP");
mvprintw(15, 1, "10. Name");
mvprintw(16, 1, "11. Sysop");
mvprintw(17, 1, "12. Date");
mvprintw(18, 1, "13. Lines");
mvprintw(19, 1, "14. Open");
mbse_mvprintw( 6, 1, " 1. BBS");
mbse_mvprintw( 7, 1, " 2. Desc.");
mbse_mvprintw( 8, 1, " 3. Desc.");
mbse_mvprintw( 9, 1, " 4. Phn 1");
mbse_mvprintw(10, 1, " 5. Phn 2");
mbse_mvprintw(11, 1, " 6. Phn 3");
mbse_mvprintw(12, 1, " 7. Phn 4");
mbse_mvprintw(13, 1, " 8. Phn 5");
mbse_mvprintw(14, 1, " 9. TCPIP");
mbse_mvprintw(15, 1, "10. Name");
mbse_mvprintw(16, 1, "11. Sysop");
mbse_mvprintw(17, 1, "12. Date");
mbse_mvprintw(18, 1, "13. Lines");
mbse_mvprintw(19, 1, "14. Open");
mvprintw(16,46, "15. Verified");
mvprintw(17,46, "16. Available");
mvprintw(18,46, "17. Software");
mvprintw(19,46, "18. Storage");
mbse_mvprintw(16,46, "15. Verified");
mbse_mvprintw(17,46, "16. Available");
mbse_mvprintw(18,46, "17. Software");
mbse_mvprintw(19,46, "18. Storage");
for (;;) {
set_color(WHITE, BLACK);
@ -352,7 +352,7 @@ void EditBBSlist(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 2, "8.6.1 BBS LISTS SETUP");
mbse_mvprintw( 5, 2, "8.6.1 BBS LISTS SETUP");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/bbslist.temp", getenv("MBSE_ROOT"));
@ -377,7 +377,7 @@ void EditBBSlist(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-32s", o + i, bbs.BBSName);
temp[38] = '\0';
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}
@ -436,7 +436,7 @@ void PurgeBBSlist(void)
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "8.6.2 BBS LISTS PURGE");
mbse_mvprintw( 5, 6, "8.6.2 BBS LISTS PURGE");
set_color(CYAN, BLACK);
working(1, 0, 0);
@ -461,9 +461,9 @@ void PurgeBBSlist(void)
}
sprintf(temp, "%d records, %d records to purge", recno, iCount);
mvprintw(7, 6, temp);
mbse_mvprintw(7, 6, temp);
if (iCount == 0) {
mvprintw(9, 6, "Press any key");
mbse_mvprintw(9, 6, "Press any key");
readkey(9, 20, LIGHTGRAY, BLACK);
return;
}
@ -492,10 +492,10 @@ void bbslist_menu(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 6, "8.6 BBS LISTS SETUP");
mbse_mvprintw( 5, 6, "8.6 BBS LISTS SETUP");
set_color(CYAN, BLACK);
mvprintw( 7, 6, "1. Edit BBS lists");
mvprintw( 8, 6, "2. Purge BBS lists");
mbse_mvprintw( 7, 6, "1. Edit BBS lists");
mbse_mvprintw( 8, 6, "2. Purge BBS lists");
switch(select_menu(2)) {
case 0:

View File

@ -216,12 +216,12 @@ void DomainScreen(void)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 2, "17. EDIT DOMAINS");
mbse_mvprintw( 5, 2, "17. EDIT DOMAINS");
set_color(CYAN, BLACK);
mvprintw( 7, 2, "1. Fidonet");
mvprintw( 8, 2, "2. Internet");
mvprintw( 9, 2, "3. Active");
mvprintw(10, 2, "4. Deleted");
mbse_mvprintw( 7, 2, "1. Fidonet");
mbse_mvprintw( 8, 2, "2. Internet");
mbse_mvprintw( 9, 2, "3. Active");
mbse_mvprintw(10, 2, "4. Deleted");
}
@ -332,7 +332,7 @@ void EditDomain(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "17. DOMAIN MANAGER");
mbse_mvprintw( 5, 4, "17. DOMAIN MANAGER");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/domain.temp", getenv("MBSE_ROOT"));
@ -354,7 +354,7 @@ void EditDomain(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-31s %-31s", o+i, domtrans.ftndom, domtrans.intdom);
temp[75] = 0;
mvprintw(y, 3, temp);
mbse_mvprintw(y, 3, temp);
y++;
}
}
@ -379,7 +379,7 @@ void EditDomain(void)
}
if (strncmp(pick, "D", 1) == 0) {
mvprintw(LINES -3, 6, "Enter domain number (1..%d) to delete >", records);
mbse_mvprintw(LINES -3, 6, "Enter domain number (1..%d) to delete >", records);
y = 0;
y = edit_int(LINES -3, 44, y, (char *)"Enter record number");
if ((y > 0) && (y <= records) && yes_no((char *)"Remove record")) {
@ -399,11 +399,11 @@ void EditDomain(void)
if (strncmp(pick, "M", 1) == 0) {
from = too = 0;
mvprintw(LINES -3, 6, "Enter domain number (1..%d) to move >", records);
mbse_mvprintw(LINES -3, 6, "Enter domain number (1..%d) to move >", records);
from = edit_int(LINES -3, 42, from, (char *)"Enter record number");
locate(LINES -3, 6);
mbse_locate(LINES -3, 6);
clrtoeol();
mvprintw(LINES -3, 6, "Enter new position (1..%d) >", records);
mbse_mvprintw(LINES -3, 6, "Enter new position (1..%d) >", records);
too = edit_int(LINES -3, 36, too, (char *)"Enter destination record number, other will move away");
if ((from == too) || (from == 0) || (too == 0) || (from > records) || (too > records)) {
errmsg("That makes no sense");

View File

@ -208,35 +208,35 @@ void FileScreen(void)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw( 4, 2, "8.4 EDIT FILE AREA");
mbse_mvprintw( 4, 2, "8.4 EDIT FILE AREA");
set_color(CYAN, BLACK);
mvprintw( 6, 2, "1. Area Name");
mvprintw( 7, 2, "2. Path");
mvprintw( 8, 2, "3. Down Sec.");
mvprintw( 9, 2, "4. Upl. Sec.");
mvprintw(10, 2, "5. List Sec.");
mvprintw(11, 2, "6. Files.bbs");
mvprintw(12, 2, "7. Available");
mvprintw(13, 2, "8. Check new");
mvprintw(14, 2, "9. Dupecheck");
mvprintw(15, 2, "10. Free area");
mvprintw(16, 2, "11. Direct DL");
mvprintw(17, 2, "12. Pwd upl.");
mvprintw(18, 2, "13. Filefind");
mbse_mvprintw( 6, 2, "1. Area Name");
mbse_mvprintw( 7, 2, "2. Path");
mbse_mvprintw( 8, 2, "3. Down Sec.");
mbse_mvprintw( 9, 2, "4. Upl. Sec.");
mbse_mvprintw(10, 2, "5. List Sec.");
mbse_mvprintw(11, 2, "6. Files.bbs");
mbse_mvprintw(12, 2, "7. Available");
mbse_mvprintw(13, 2, "8. Check new");
mbse_mvprintw(14, 2, "9. Dupecheck");
mbse_mvprintw(15, 2, "10. Free area");
mbse_mvprintw(16, 2, "11. Direct DL");
mbse_mvprintw(17, 2, "12. Pwd upl.");
mbse_mvprintw(18, 2, "13. Filefind");
mvprintw(12,30, "14. Add alpha");
mvprintw(13,30, "15. CDrom");
mvprintw(14,30, "16. File req.");
mvprintw(15,30, "17. BBS Group");
mvprintw(16,30, "18. New group");
mvprintw(17,30, "19. Min. age");
mvprintw(18,30, "20. Password");
mbse_mvprintw(12,30, "14. Add alpha");
mbse_mvprintw(13,30, "15. CDrom");
mbse_mvprintw(14,30, "16. File req.");
mbse_mvprintw(15,30, "17. BBS Group");
mbse_mvprintw(16,30, "18. New group");
mbse_mvprintw(17,30, "19. Min. age");
mbse_mvprintw(18,30, "20. Password");
mvprintw(12,59, "21. DL days");
mvprintw(13,59, "22. FD days");
mvprintw(14,59, "23. Move area");
mvprintw(15,59, "24. Archiver");
mvprintw(16,59, "25. Upload");
mbse_mvprintw(12,59, "21. DL days");
mbse_mvprintw(13,59, "22. FD days");
mbse_mvprintw(14,59, "23. Move area");
mbse_mvprintw(15,59, "24. Archiver");
mbse_mvprintw(16,59, "25. Upload");
}
@ -485,7 +485,7 @@ void EditFilearea(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "8.4 FILE AREA SETUP");
mbse_mvprintw( 5, 4, "8.4 FILE AREA SETUP");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/fareas.temp", getenv("MBSE_ROOT"));
@ -510,7 +510,7 @@ void EditFilearea(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-32s", o + i, area.Name);
temp[37] = 0;
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}
@ -536,9 +536,9 @@ void EditFilearea(void)
if (strncmp(pick, "M", 1) == 0) {
from = too = 0;
mvprintw(LINES -3, 5, "From");
mbse_mvprintw(LINES -3, 5, "From");
from = edit_int(LINES -3, 10, from, (char *)"Wich ^area^ you want to move");
mvprintw(LINES -3,15, "To");
mbse_mvprintw(LINES -3,15, "To");
too = edit_int(LINES -3, 18, too, (char *)"Too which ^area^ to move");
sprintf(temp, "%s/etc/fareas.temp", getenv("MBSE_ROOT"));
@ -679,7 +679,7 @@ long PickFilearea(char *shdr)
clr_index();
set_color(WHITE, BLACK);
sprintf(temp, "%s. FILE AREA SELECT", shdr);
mvprintw(5,3,temp);
mbse_mvprintw(5,3,temp);
set_color(CYAN, BLACK);
if (records) {
sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
@ -704,7 +704,7 @@ long PickFilearea(char *shdr)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-31s", o + i, area.Name);
temp[38] = '\0';
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}

View File

@ -48,23 +48,23 @@ void FHeader(void)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 2, "14. EDIT FILE");
mbse_mvprintw( 5, 2, "14. EDIT FILE");
set_color(CYAN, BLACK);
mvprintw( 7, 2, " FileName");
mvprintw( 8, 2, " Long fn");
mvprintw( 9, 2, " FileSize");
mvprintw(10, 2, " FileDate");
mvprintw(11, 2, " Last DL.");
mvprintw(12, 2, " Upl.Date");
mvprintw(13, 2, " TIC area");
mvprintw(14, 2, " Magic");
mvprintw(15, 2, "1. Uploader");
mvprintw(16, 2, "2. Times DL");
mvprintw(17, 2, "3. Password");
mbse_mvprintw( 7, 2, " FileName");
mbse_mvprintw( 8, 2, " Long fn");
mbse_mvprintw( 9, 2, " FileSize");
mbse_mvprintw(10, 2, " FileDate");
mbse_mvprintw(11, 2, " Last DL.");
mbse_mvprintw(12, 2, " Upl.Date");
mbse_mvprintw(13, 2, " TIC area");
mbse_mvprintw(14, 2, " Magic");
mbse_mvprintw(15, 2, "1. Uploader");
mbse_mvprintw(16, 2, "2. Times DL");
mbse_mvprintw(17, 2, "3. Password");
mvprintw(15,61, "4. Deleted");
mvprintw(16,61, "5. No Kill");
mvprintw(17,61, "6. Announced");
mbse_mvprintw(15,61, "4. Deleted");
mbse_mvprintw(16,61, "5. No Kill");
mbse_mvprintw(17,61, "6. Announced");
}
@ -78,9 +78,9 @@ void EditFile()
show_str( 7,16,12, fdb.Name);
show_str( 8,16,64, fdb.LName);
show_int( 9,16, fdb.Size);
mvprintw(10,16, (char *)"%s %s", StrDateDMY(fdb.FileDate), StrTimeHM(fdb.FileDate));
mvprintw(11,16, (char *)"%s %s", StrDateDMY(fdb.LastDL), StrTimeHM(fdb.LastDL));
mvprintw(12,16, (char *)"%s %s", StrDateDMY(fdb.UploadDate), StrTimeHM(fdb.UploadDate));
mbse_mvprintw(10,16, (char *)"%s %s", StrDateDMY(fdb.FileDate), StrTimeHM(fdb.FileDate));
mbse_mvprintw(11,16, (char *)"%s %s", StrDateDMY(fdb.LastDL), StrTimeHM(fdb.LastDL));
mbse_mvprintw(12,16, (char *)"%s %s", StrDateDMY(fdb.UploadDate), StrTimeHM(fdb.UploadDate));
show_str(13,16,20, fdb.TicArea);
show_str(14,16,20, fdb.Magic);
show_str(15,16,36, fdb.Uploader);
@ -135,13 +135,13 @@ void E_F(long areanr)
clr_index();
set_color(WHITE, BLACK);
mvprintw(5, 4, "14. EDIT FILES DATABASE");
mbse_mvprintw(5, 4, "14. EDIT FILES DATABASE");
y = 8;
working(1, 0, 0);
set_color(YELLOW, BLUE);
mvprintw(7, 1, " Nr Filename Size Date Time Description ");
mbse_mvprintw(7, 1, " Nr Filename Size Date Time Description ");
/* 1234 12345678901234 12345678 12-34-1998 12:45 123456789012345678901234567890*/
set_color(CYAN, BLACK);
@ -152,7 +152,7 @@ void E_F(long areanr)
fread(&fdb, fdbhdr.recsize, 1, fil);
set_color(WHITE, BLACK);
mvprintw(y, 1, (char *)"%4d.", o + i);
mbse_mvprintw(y, 1, (char *)"%4d.", o + i);
sprintf(temp, "%s/%s", area.Path, fdb.LName);
Ondisk = ((stat(temp, &statfile)) != -1);
@ -163,27 +163,27 @@ void E_F(long areanr)
set_color(CYAN, BLACK);
else
set_color(LIGHTRED, BLACK);
mvprintw(y, 8, (char *)"%-14s", fdb.Name);
mbse_mvprintw(y, 8, (char *)"%-14s", fdb.Name);
if (Ondisk) {
if (fdb.Size == statfile.st_size)
set_color(CYAN, BLACK);
else
set_color(LIGHTRED, BLACK);
mvprintw(y,23, (char *)"%8ld", fdb.Size);
mbse_mvprintw(y,23, (char *)"%8ld", fdb.Size);
if (fdb.FileDate == statfile.st_mtime)
set_color(CYAN, BLACK);
else
set_color(LIGHTRED, BLACK);
Time = fdb.FileDate;
mvprintw(y,32, (char *)"%s %s", StrDateDMY(Time), StrTimeHM(Time));
mbse_mvprintw(y,32, (char *)"%s %s", StrDateDMY(Time), StrTimeHM(Time));
}
set_color(CYAN, BLACK);
sprintf(temp, "%s", fdb.Desc[0]);
temp[30] = '\0';
mvprintw(y,49, (char *)"%s", temp);
mbse_mvprintw(y,49, (char *)"%s", temp);
y++;
}
}
@ -199,10 +199,10 @@ void E_F(long areanr)
showhelp(help);
while(TRUE) {
mvprintw(LINES - 4, 6, "Enter your choice >");
mbse_mvprintw(LINES - 4, 6, "Enter your choice >");
menu = (char *)"-";
menu = edit_field(LINES - 4, 26, 6, '!', menu);
locate(LINES - 4, 6);
mbse_locate(LINES - 4, 6);
clrtoeol();
if (strncmp(menu, "-", 1) == 0) {
@ -282,7 +282,7 @@ void EditFDB()
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "14. EDIT FILES DATABSE");
mbse_mvprintw( 5, 4, "14. EDIT FILES DATABSE");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/fareas.data", getenv("MBSE_ROOT"));
@ -307,7 +307,7 @@ void EditFDB()
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-32s", o + i, area.Name);
temp[37] = 0;
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}

View File

@ -214,20 +214,20 @@ void FFScreen(void)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 2, "13. EDIT FILEFIND AREAS");
mbse_mvprintw( 5, 2, "13. EDIT FILEFIND AREAS");
set_color(CYAN, BLACK);
mvprintw( 7, 2, "1. Comment");
mvprintw( 8, 2, "2. Origin");
mvprintw( 9, 2, "3. Aka to use");
mvprintw(10, 2, "4. Scan area");
mvprintw(11, 2, "5. Reply area");
mvprintw(12, 2, "6. Language");
mvprintw(13, 2, "7. Template");
mvprintw(14, 2, "8. Active");
mvprintw(15, 2, "9. Deleted");
mvprintw(16, 2, "10. Net. reply");
mvprintw(17, 2, "11. Hi Ascii");
mvprintw(18, 2, "12. Keywrd len");
mbse_mvprintw( 7, 2, "1. Comment");
mbse_mvprintw( 8, 2, "2. Origin");
mbse_mvprintw( 9, 2, "3. Aka to use");
mbse_mvprintw(10, 2, "4. Scan area");
mbse_mvprintw(11, 2, "5. Reply area");
mbse_mvprintw(12, 2, "6. Language");
mbse_mvprintw(13, 2, "7. Template");
mbse_mvprintw(14, 2, "8. Active");
mbse_mvprintw(15, 2, "9. Deleted");
mbse_mvprintw(16, 2, "10. Net. reply");
mbse_mvprintw(17, 2, "11. Hi Ascii");
mbse_mvprintw(18, 2, "12. Keywrd len");
}
@ -356,7 +356,7 @@ void EditFilefind(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "13. FILEFIND AREAS");
mbse_mvprintw( 5, 4, "13. FILEFIND AREAS");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/scanmgr.temp", getenv("MBSE_ROOT"));
@ -381,7 +381,7 @@ void EditFilefind(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-32s", o + i, scanmgr.Comment);
temp[37] = 0;
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}

View File

@ -263,41 +263,41 @@ void FgScreen(void)
{
clr_index();
set_color(WHITE, BLACK);
mvprintw( 4, 2, "10.1 EDIT FILE GROUP");
mbse_mvprintw( 4, 2, "10.1 EDIT FILE GROUP");
set_color(CYAN, BLACK);
mvprintw( 6, 2, "1. Name");
mvprintw( 7, 2, "2. Comment");
mvprintw( 8, 2, "3. Base path");
mvprintw( 9, 2, "4. Use Aka");
mvprintw(10, 2, "5. Uplink");
mvprintw(11, 2, "6. Areas");
mvprintw(12, 2, "7. Filegate");
mvprintw(13, 2, "8. Banner");
mvprintw(14, 2, "9. Convert");
mvprintw(15, 2, "10. BBS group");
mvprintw(16, 2, "11. New group");
mvprintw(17, 2, "12. Active");
mvprintw(18, 2, "13. Deleted");
mvprintw(19, 2, "14. Start at");
mbse_mvprintw( 6, 2, "1. Name");
mbse_mvprintw( 7, 2, "2. Comment");
mbse_mvprintw( 8, 2, "3. Base path");
mbse_mvprintw( 9, 2, "4. Use Aka");
mbse_mvprintw(10, 2, "5. Uplink");
mbse_mvprintw(11, 2, "6. Areas");
mbse_mvprintw(12, 2, "7. Filegate");
mbse_mvprintw(13, 2, "8. Banner");
mbse_mvprintw(14, 2, "9. Convert");
mbse_mvprintw(15, 2, "10. BBS group");
mbse_mvprintw(16, 2, "11. New group");
mbse_mvprintw(17, 2, "12. Active");
mbse_mvprintw(18, 2, "13. Deleted");
mbse_mvprintw(19, 2, "14. Start at");
mvprintw(12,32, "15. Auto chng");
mvprintw(13,32, "16. User chng");
mvprintw(14,32, "17. Replace");
mvprintw(15,32, "18. Dupecheck");
mvprintw(16,32, "19. Secure");
mvprintw(17,32, "20. Touch");
mvprintw(18,32, "21. Virscan");
mvprintw(19,32, "22. Announce");
mbse_mvprintw(12,32, "15. Auto chng");
mbse_mvprintw(13,32, "16. User chng");
mbse_mvprintw(14,32, "17. Replace");
mbse_mvprintw(15,32, "18. Dupecheck");
mbse_mvprintw(16,32, "19. Secure");
mbse_mvprintw(17,32, "20. Touch");
mbse_mvprintw(18,32, "21. Virscan");
mbse_mvprintw(19,32, "22. Announce");
mvprintw(11,56, "23. Upd magic");
mvprintw(12,56, "24. File ID");
mvprintw(13,56, "25. Conv. all");
mvprintw(14,56, "26. Send orig");
mvprintw(15,56, "27. DL sec");
mvprintw(16,56, "28. UP sec");
mvprintw(17,56, "29. LT sec");
mvprintw(18,56, "30. Upl. area");
mvprintw(19,56, "31. Link sec");
mbse_mvprintw(11,56, "23. Upd magic");
mbse_mvprintw(12,56, "24. File ID");
mbse_mvprintw(13,56, "25. Conv. all");
mbse_mvprintw(14,56, "26. Send orig");
mbse_mvprintw(15,56, "27. DL sec");
mbse_mvprintw(16,56, "28. UP sec");
mbse_mvprintw(17,56, "29. LT sec");
mbse_mvprintw(18,56, "30. Upl. area");
mbse_mvprintw(19,56, "31. Link sec");
}
@ -512,7 +512,7 @@ void EditFGroup(void)
for (;;) {
clr_index();
set_color(WHITE, BLACK);
mvprintw( 5, 4, "10.1 FILE GROUPS SETUP");
mbse_mvprintw( 5, 4, "10.1 FILE GROUPS SETUP");
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/fgroups.temp", getenv("MBSE_ROOT"));
@ -537,7 +537,7 @@ void EditFGroup(void)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-12s %-18s", o + i, fgroup.Name, fgroup.Comment);
temp[38] = '\0';
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}
@ -619,7 +619,7 @@ char *PickFGroup(char *shdr)
clr_index();
set_color(WHITE, BLACK);
sprintf(temp, "%s. FILE GROUP SELECT", shdr);
mvprintw( 5, 4, temp);
mbse_mvprintw( 5, 4, temp);
set_color(CYAN, BLACK);
if (records != 0) {
sprintf(temp, "%s/etc/fgroups.data", getenv("MBSE_ROOT"));
@ -644,7 +644,7 @@ char *PickFGroup(char *shdr)
set_color(LIGHTBLUE, BLACK);
sprintf(temp, "%3d. %-12s %-18s", o + i, fgroup.Name, fgroup.Comment);
temp[38] = '\0';
mvprintw(y, x, temp);
mbse_mvprintw(y, x, temp);
y++;
}
}

Some files were not shown because too many files have changed in this diff Show More