home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
OSK
/
TELECOM
/
OSKBox.lzh
/
MAILBOX
/
CC
/
beacon.c
next >
Wrap
C/C++ Source or Header
|
1991-02-14
|
893b
|
45 lines
#include <stdio.h>
#include "mailbox.h"
#define MAXCALL 100
struct userstruct user;
main (argc, argv)
char *argv[];
{
struct msg_header *head;
int path;
int time;
char calls[MAXCALL][8];
int i, max, flag;
char line[MAXCALL*10], *p;
chdir (HOME);
strcpy (user.uscall, "SYSOP");
user.usopt = ISSUPER;
flag = max = 0;
open_mail ();
while ((head = next_mail (is_new)) != NULL && max < MAXCALL) {
if (*head->mhbbs && !is_at (head, MYCALL))
continue;
if (is_to (head, MYCALL) || is_to (head, "WP") || is_to (head, "WPAGE"))
continue;
for (i = 0; i < max; i++)
if (is_to (head, calls[i])) break;
if (i == max)
strcpy (calls[max++], head->mhto);
flag = 1;
}
close_mail ();
if (flag) {
p = line;
p += sprintf (p, "Mail for:");
for (i = 0; i < max; i++)
p += sprintf (p, " %s", calls[i]);
p += sprintf (p, "\n");
writeln (1, line, p-line);
}
}