Added OS and CPU nameing functions

This commit is contained in:
Michiel Broek
2002-02-10 15:57:05 +00:00
parent 4f76ee06db
commit 054987b525
21 changed files with 79 additions and 98 deletions

View File

@@ -53,7 +53,6 @@
* External declarations
*/
extern int do_quiet;
extern char *tearline;
@@ -125,7 +124,7 @@ void A_Help(faddr *t, char *replyid)
fprintf(fp, " -GENERAL\r");
fprintf(fp, " %%QUERY\r");
fprintf(fp, " %%LIST\r\r");
fprintf(fp, "%s\r", tearline);
fprintf(fp, "%s\r", TearLine());
CloseMail(fp, t);
net_out++;
} else
@@ -231,7 +230,7 @@ void A_Query(faddr *t, char *replyid)
fprintf(qp, " P - The message area is temporary paused\r");
fprintf(qp, " C - You are cutoff from this area\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -338,7 +337,7 @@ void A_List(faddr *t, char *replyid, int Notify)
fprintf(qp, " P - The message area is temporary paused\r");
fprintf(qp, " C - You are cutoff from this area\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -452,7 +451,7 @@ void A_Flow(faddr *t, char *replyid, int Notify)
fprintf(qp, "Con means:\r");
fprintf(qp, " C - You connected to this area\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -493,7 +492,7 @@ void A_Status(faddr *t, char *replyid)
fprintf(fp, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(fp, "%s\r", tearline);
fprintf(fp, "%s\r", TearLine());
CloseMail(fp, t);
net_out++;
} else
@@ -599,7 +598,7 @@ void A_Unlinked(faddr *t, char *replyid)
fprintf(qp, " P - The message area is temporary paused\r");
fprintf(qp, " C - You are cutoff from this area\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -1068,7 +1067,7 @@ int AreaMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
}
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(np, "%s\r", tearline);
fprintf(np, "%s\r", TearLine());
CloseMail(np, t);
net_out++;
} else

View File

@@ -53,7 +53,6 @@
* External declarations
*/
extern int do_quiet;
extern char *tearline;
@@ -135,7 +134,7 @@ int Bounce(faddr *f, faddr *t, FILE *fp, char *reason)
}
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(np, "%s\r", tearline);
fprintf(np, "%s\r", TearLine());
Now = time(NULL) - (gmt_offset((time_t)0) * 60);
rc = postnetmail(np, from, f, NULL, (char *)"Bounced message", Now, 0x0000, FALSE);
tidy_faddr(from);

View File

@@ -52,7 +52,6 @@
* External declarations
*/
extern int do_quiet;
extern char *tearline;
@@ -124,7 +123,7 @@ void F_Help(faddr *t, char *replyid)
fprintf(fp, " %%QUERY\r");
fprintf(fp, " %%LIST\r\r");
fprintf(fp, "%s\r", tearline);
fprintf(fp, "%s\r", TearLine());
CloseMail(fp, t);
net_out++;
} else
@@ -226,7 +225,7 @@ void F_Query(faddr *t, char *replyid)
fprintf(qp, " S - You may send files in this area\r");
fprintf(qp, " P - The file area is temporary paused\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -329,7 +328,7 @@ void F_List(faddr *t, char *replyid, int Notify)
fprintf(qp, " S - You may send files in this area\r");
fprintf(qp, " P - The file area is temporary paused\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -379,7 +378,7 @@ void F_Status(faddr *t, char *replyid)
fprintf(fp, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(fp, "%s\r", tearline);
fprintf(fp, "%s\r", TearLine());
CloseMail(fp, t);
net_out++;
} else
@@ -481,7 +480,7 @@ void F_Unlinked(faddr *t, char *replyid)
fprintf(qp, " S - You may send files in this area\r");
fprintf(qp, " P - The file area is temporary paused\r\r");
fprintf(qp, "With regards, %s\r\r", CFG.sysop_name);
fprintf(qp, "%s\r", tearline);
fprintf(qp, "%s\r", TearLine());
CloseMail(qp, t);
net_out++;
free(temp);
@@ -942,7 +941,7 @@ int FileMgr(faddr *f, faddr *t, char *replyid, char *subj, time_t mdate, int fla
}
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(np, "%s\r", tearline);
fprintf(np, "%s\r", TearLine());
CloseMail(np, t);
net_out++;
} else

View File

@@ -44,6 +44,7 @@
void ForwardFile(fidoaddr Node, fa_list *sbl)
{
char *subject = NULL, *temp, *fwdfile = NULL, *ticfile = NULL, fname[PATH_MAX];
@@ -150,7 +151,7 @@ void ForwardFile(fidoaddr Node, fa_list *sbl)
fprintf(net, "\r\r");
fprintf(net, "With regards, %s\r\r", CFG.sysop_name);
fprintf(net, "... %s\r\r", Cookie());
fprintf(net, "--- MBSE BBS %s\r", VERSION);
fprintf(net, "%s\r", TearLine());
CloseMail(net, fido2faddr(Node));
} else {
WriteError("$Can't create netmail");

View File

@@ -48,7 +48,6 @@ extern int do_quiet; /* Supress screen output */
extern int show_log; /* Show logging */
time_t t_start; /* Start time */
time_t t_end; /* End time */
char *tearline; /* Standard tearline */
@@ -83,7 +82,6 @@ void die(int onsig)
colour(7, 0);
printf("\n");
}
free(tearline);
ExitClient(onsig);
}
@@ -107,16 +105,6 @@ int main(int argc, char **argv)
Miy = t->tm_mon;
umask(002);
tearline = calloc(41, sizeof(char *));
#ifdef __linux__
sprintf(tearline, "--- MBSE BBS v%s (Linux)", VERSION);
#elif __FreeBSD__
sprintf(tearline, "--- MBSE BBS v%s (FreeBSD)", VERSION);
#elif __NetBSD__
sprintf(tearline, "--- MBSE BBS v%s (NetBSD)", VERSION);
#else
sprintf(tearline, "--- MBSE BBS v%s (Unknown)", VERSION);
#endif
/*
* Catch all signals we can, and ignore the rest.

View File

@@ -93,7 +93,6 @@ time_t t_end; /* End time */
int packets = 0; /* Tossed packets */
int packets_ok = 0; /* Tossed packets Ok. */
char *envptr = NULL;
char *tearline; /* Standard tearline for mail */
extern int net_in, net_imp, net_out, net_bad;
extern int echo_in, echo_imp, echo_out, echo_bad, echo_dupe;
@@ -242,7 +241,6 @@ void die(int onsig)
if (!do_quiet)
colour(7, 0);
free(tearline);
ExitClient(onsig);
}
@@ -305,16 +303,6 @@ int main(int argc, char **argv)
Miy = t->tm_mon;
umask(002);
tearline = calloc(41, sizeof(char *));
#ifdef __linux__
sprintf(tearline, "--- MBSE BBS v%s (Linux)", VERSION);
#elif __FreeBSD__
sprintf(tearline, "--- MBSE BBS v%s (FreeBSD)", VERSION);
#elif __NetBSD__
sprintf(tearline, "--- MBSE BBS v%s (NetBSD)", VERSION);
#else
sprintf(tearline, "--- MBSE BBS v%s (Unknown)", VERSION);
#endif
/*
* Catch all the signals we can, and ignore the rest.

View File

@@ -58,7 +58,6 @@ int msg_del = 0; /* Deleted messages */
int msg_link = 0; /* Linked messages */
int processed = FALSE; /* Did process something */
int oldmask;
char *tearline; /* Standard tearline */
@@ -96,17 +95,6 @@ int main(int argc, char **argv)
oldmask = umask(007);
t_start = time(NULL);
tearline = calloc(41, sizeof(char *));
#ifdef __linux__
sprintf(tearline, "--- MBSE BBS v%s (Linux)", VERSION);
#elif __FreeBSD__
sprintf(tearline, "--- MBSE BBS v%s (FreeBSD)", VERSION);
#elif __NetBSD__
sprintf(tearline, "--- MBSE BBS v%s (NetBSD)", VERSION);
#else
sprintf(tearline, "--- MBSE BBS v%s (Unknown)", VERSION);
#endif
/*
* Catch all signals we can, and ignore or catch them
*/
@@ -256,7 +244,6 @@ void die(int onsig)
colour(7, 0);
printf("\r \n");
}
free(tearline);
ExitClient(onsig);
}

View File

@@ -41,7 +41,6 @@
extern int do_quiet; /* Supress screen output */
extern char *tearline;
/*
@@ -157,7 +156,7 @@ void Msg_Bot(fidoaddr UseAka, char *Org)
sprintf(temp, "With regards, %s", CFG.sysop_name);
MsgText_Add2(temp);
MsgText_Add2((char *)"");
MsgText_Add2(tearline);
MsgText_Add2(TearLine());
if (UseAka.point)
sprintf(aka, "(%d:%d/%d.%d)", UseAka.zone, UseAka.net, UseAka.node, UseAka.point);

View File

@@ -53,7 +53,6 @@
* External declarations
*/
extern int do_quiet;
extern char *tearline;
@@ -134,7 +133,7 @@ int Ping(faddr *f, faddr *t, FILE *fp, int intransit)
fprintf(np, "======================================================================\r");
fprintf(np, "\rWith regards, %s\r\r", CFG.sysop_name);
fprintf(np, "%s\r", tearline);
fprintf(np, "%s\r", TearLine());
Now = time(NULL) - (gmt_offset((time_t)0) * 60);
rc = postnetmail(np, from, f, NULL, (char *)"Re: Ping", Now, 0x0000, FALSE);
tidy_faddr(from);

View File

@@ -41,7 +41,6 @@
extern int do_quiet; /* Supress screen output */
extern char *tearline;
@@ -211,7 +210,7 @@ void Post(char *To, long Area, char *Subj, char *File, char *Flavor)
*/
aka = calloc(40, sizeof(char));
MsgText_Add2((char *)"");
MsgText_Add2(tearline);
MsgText_Add2(TearLine());
if (msgs.Aka.point)
sprintf(aka, "(%d:%d/%d.%d)", msgs.Aka.zone, msgs.Aka.net, msgs.Aka.node, msgs.Aka.point);

View File

@@ -699,7 +699,7 @@ int rfc2ftn(FILE *fp, faddr *recipient)
else
charwrite(p,ofp);
} else
fprintf(ofp,"--- MBSE BBSv.%s\n",VERSION);
fprintf(ofp,"%s\n", TearLine());
if ((p = hdr((char *)"X-FTN-Origin",msg))) {
if (*(q=p+strlen(p)-1) == '\n')