Zmodem minor changes, upgraded ASCII OLR download
This commit is contained in:
parent
f0459e49c3
commit
93ad42ba02
@ -1,8 +1,13 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
|
|
||||||
|
v0.83.16 13-Mar-2006
|
||||||
|
|
||||||
v0.83.15 05-Mar-2006
|
v0.83.15 05-Mar-2006 - 13-Mar-2006
|
||||||
|
|
||||||
|
mbsebbs:
|
||||||
|
Upgraded ASCII OLR download to the latest discussions.
|
||||||
|
Made some minor changes in internal zmodem.
|
||||||
|
|
||||||
|
|
||||||
v0.83.14 23-Feb-2006 - 05-Mar-2006.
|
v0.83.14 23-Feb-2006 - 05-Mar-2006.
|
||||||
|
2
TODO
2
TODO
@ -1,6 +1,6 @@
|
|||||||
$Id$
|
$Id$
|
||||||
|
|
||||||
MBSE BBS V0.83.15 TODO list.
|
MBSE BBS V0.83.16 TODO list.
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
These are a list of things that must be implemented one way or
|
These are a list of things that must be implemented one way or
|
||||||
|
2
configure
vendored
2
configure
vendored
@ -1305,7 +1305,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang
|
|||||||
PACKAGE="mbsebbs"
|
PACKAGE="mbsebbs"
|
||||||
MAJOR="0"
|
MAJOR="0"
|
||||||
MINOR="83"
|
MINOR="83"
|
||||||
REVISION="15"
|
REVISION="16"
|
||||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||||
COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved"
|
COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved"
|
||||||
SHORTRIGHT="Copyright (C) 1997-2006 M. Broek"
|
SHORTRIGHT="Copyright (C) 1997-2006 M. Broek"
|
||||||
|
@ -13,7 +13,7 @@ dnl
|
|||||||
PACKAGE="mbsebbs"
|
PACKAGE="mbsebbs"
|
||||||
MAJOR="0"
|
MAJOR="0"
|
||||||
MINOR="83"
|
MINOR="83"
|
||||||
REVISION="15"
|
REVISION="16"
|
||||||
VERSION="$MAJOR.$MINOR.$REVISION"
|
VERSION="$MAJOR.$MINOR.$REVISION"
|
||||||
COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved"
|
COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved"
|
||||||
SHORTRIGHT="Copyright (C) 1997-2006 M. Broek"
|
SHORTRIGHT="Copyright (C) 1997-2006 M. Broek"
|
||||||
|
@ -2701,6 +2701,18 @@ void OLR_DownASCII(void)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Write generic bbs info
|
||||||
|
*/
|
||||||
|
fprintf(inf, "BBS %s\n", CFG.bbs_name);
|
||||||
|
for (i = 0; i < 40; i++) {
|
||||||
|
if (CFG.akavalid[i])
|
||||||
|
fprintf(inf, "Aka %s\n", aka2str(CFG.aka[i]));
|
||||||
|
}
|
||||||
|
fprintf(inf, "Domain %s\n", CFG.sysdomain);
|
||||||
|
fprintf(inf, "Version mbsebbs v%s\n", VERSION);
|
||||||
|
fprintf(inf, "\n");
|
||||||
|
|
||||||
Area = 0;
|
Area = 0;
|
||||||
DrawBar(Pktname);
|
DrawBar(Pktname);
|
||||||
fseek(mf, sizeof(msgshdr), SEEK_SET);
|
fseek(mf, sizeof(msgshdr), SEEK_SET);
|
||||||
@ -2850,7 +2862,7 @@ unsigned int ASCII_PackArea(unsigned int ulLast, int Area, char *Atag)
|
|||||||
char *Work, *Temp, *Text, msg[81];
|
char *Work, *Temp, *Text, msg[81];
|
||||||
unsigned int Number;
|
unsigned int Number;
|
||||||
int Pack = FALSE;
|
int Pack = FALSE;
|
||||||
struct tm *tp;
|
time_t now;
|
||||||
|
|
||||||
Number = ulLast;
|
Number = ulLast;
|
||||||
Current = Personal = 0L;
|
Current = Personal = 0L;
|
||||||
@ -2879,35 +2891,53 @@ unsigned int ASCII_PackArea(unsigned int ulLast, int Area, char *Atag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (Pack) {
|
if (Pack) {
|
||||||
fprintf (fp, "===============================================================================\n");
|
fprintf(fp, "#@ olrmsg\n");
|
||||||
fprintf (fp, " Msg: #%d of %d (%s)\n",
|
// fprintf(fp, " Msg: #%d of %d (%s)\n", Number, Msg_Number(), msgs.Name);
|
||||||
Number, Msg_Number(), msgs.Name);
|
// tp = localtime(&Msg.Written);
|
||||||
tp = localtime(&Msg.Written);
|
// fprintf(fp, " Date: %d %s %d %2d:%02d\n", tp->tm_mday,
|
||||||
fprintf (fp, " Date: %d %s %d %2d:%02d\n", tp->tm_mday,
|
// GetMonth(tp->tm_mon + 1), tp->tm_year, tp->tm_hour, tp->tm_min);
|
||||||
GetMonth(tp->tm_mon + 1), tp->tm_year, tp->tm_hour, tp->tm_min);
|
now = (time_t)Msg.Written;
|
||||||
fprintf (fp, " From: %s\n", Msg.From);
|
fprintf(fp, "Date: %s\n", rfcdate(now));
|
||||||
if (Msg.To[0])
|
fprintf(fp, "From: %s\n", Msg.From);
|
||||||
fprintf (fp, " To: %s\n", Msg.To);
|
if (strlen(Msg.FromAddress))
|
||||||
fprintf (fp, " Subj: %s\n", Msg.Subject);
|
fprintf(fp, "From-ftn: %s\n", Msg.FromAddress);
|
||||||
|
fprintf(fp, "Subject: %s\n", Msg.Subject);
|
||||||
|
if (Msg.To[0]) {
|
||||||
|
fprintf (fp, "To: %s\n", Msg.To);
|
||||||
|
if (strlen(Msg.ToAddress))
|
||||||
|
fprintf(fp, "To-ftn: %s\n", Msg.ToAddress);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If present, add the msgid
|
* If present, add the msgid, origin line and reply.
|
||||||
*/
|
*/
|
||||||
if ((Text = (char *)MsgText_First()) != NULL) {
|
if ((Text = (char *)MsgText_First()) != NULL) {
|
||||||
do {
|
do {
|
||||||
if (strncmp(Text, "\001MSGID: ", 8) == 0) {
|
if (strncmp(Text, "\001MSGID: ", 8) == 0) {
|
||||||
fprintf (fp, "Msgid: %s\n", Text+8);
|
fprintf(fp, "Message-ID: %s\n", Text+8);
|
||||||
break;
|
}
|
||||||
|
if (strncmp(Text, "\001REPLY: ", 8) == 0) {
|
||||||
|
fprintf(fp, "In-Reply-To: %s\n", Text+8);
|
||||||
|
}
|
||||||
|
if (strncmp(Text, " * Origin: ", 11) == 0) {
|
||||||
|
fprintf(fp, "Organisation: %s\n", Text+11);
|
||||||
}
|
}
|
||||||
} while ((Text = (char *)MsgText_Next()) != NULL);
|
} while ((Text = (char *)MsgText_Next()) != NULL);
|
||||||
}
|
}
|
||||||
fprintf (fp, "-------------------------------------------------------------------------------\n");
|
fprintf(fp, "\n");
|
||||||
Current++;
|
Current++;
|
||||||
Total++;
|
Total++;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Add message body
|
||||||
|
*/
|
||||||
if ((Text = (char *)MsgText_First()) != NULL) {
|
if ((Text = (char *)MsgText_First()) != NULL) {
|
||||||
do {
|
do {
|
||||||
if (Text[0] != 0x01 && strncmp(Text, "SEEN-BY: ", 9))
|
if (Text[0] != 0x01 && strncmp(Text, "SEEN-BY: ", 9) && strncmp(Text, " * Origin: ", 11)) {
|
||||||
|
if (strcmp(Text, "#@ olrmsg") == 0)
|
||||||
|
fprintf(fp, "-");
|
||||||
fprintf(fp, "%s\n", Text);
|
fprintf(fp, "%s\n", Text);
|
||||||
|
}
|
||||||
} while ((Text = (char *)MsgText_Next()) != NULL);
|
} while ((Text = (char *)MsgText_Next()) != NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,15 +55,6 @@ int hanged_up = 0;
|
|||||||
unsigned Baudrate = 2400;
|
unsigned Baudrate = 2400;
|
||||||
int current_mode = -1;
|
int current_mode = -1;
|
||||||
|
|
||||||
/* Next is on compile commandline in lrzsz */
|
|
||||||
#define NFGVMIN 1
|
|
||||||
#define HOWMANY 255
|
|
||||||
|
|
||||||
#if defined(HOWMANY) && HOWMANY > 255
|
|
||||||
#ifndef NFGVMIN
|
|
||||||
Howmany must be 255 or less
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
static struct {
|
static struct {
|
||||||
@ -202,34 +193,13 @@ int io_mode(int fd, int n)
|
|||||||
}
|
}
|
||||||
tty = oldtty;
|
tty = oldtty;
|
||||||
|
|
||||||
tty.c_iflag = BRKINT|IXON;
|
tty.c_iflag = 0; /* Transparant input */
|
||||||
|
tty.c_oflag = 0; /* Transparent output */
|
||||||
tty.c_oflag = 0; /* Transparent output */
|
tty.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD); /* Disable parity and all character sizes */
|
||||||
|
tty.c_cflag |= CS8 | CREAD | HUPCL | CLOCAL;
|
||||||
tty.c_cflag &= ~PARENB; /* Disable parity */
|
|
||||||
tty.c_cflag |= (CS8 & CRTSCTS); /* Set character size = 8 and xon/xoff */
|
|
||||||
#ifdef READCHECK
|
|
||||||
tty.c_lflag = protocol==ZM_ZMODEM ? 0 : ISIG;
|
|
||||||
tty.c_cc[VINTR] = protocol==ZM_ZMODEM ? -1 : 030; /* Interrupt char */
|
|
||||||
#else
|
|
||||||
tty.c_lflag = 0;
|
tty.c_lflag = 0;
|
||||||
tty.c_cc[VINTR] = protocol==ZM_ZMODEM ? 03 : 030; /* Interrupt char */
|
|
||||||
#endif
|
|
||||||
#ifdef _POSIX_VDISABLE
|
|
||||||
if (((int) _POSIX_VDISABLE)!=(-1)) {
|
|
||||||
tty.c_cc[VQUIT] = _POSIX_VDISABLE; /* Quit char */
|
|
||||||
} else {
|
|
||||||
tty.c_cc[VQUIT] = -1; /* Quit char */
|
|
||||||
}
|
|
||||||
#else
|
|
||||||
tty.c_cc[VQUIT] = -1; /* Quit char */
|
|
||||||
#endif
|
|
||||||
#ifdef NFGVMIN
|
|
||||||
tty.c_cc[VMIN] = 1;
|
tty.c_cc[VMIN] = 1;
|
||||||
#else
|
tty.c_cc[VTIME] = 0;
|
||||||
tty.c_cc[VMIN] = 3; /* This many chars satisfies reads */
|
|
||||||
#endif
|
|
||||||
tty.c_cc[VTIME] = 1; /* or in this many tenths of seconds */
|
|
||||||
|
|
||||||
tcsetattr(fd,TCSADRAIN,&tty);
|
tcsetattr(fd,TCSADRAIN,&tty);
|
||||||
|
|
||||||
@ -347,8 +317,8 @@ int io_mode(int fd, int n)
|
|||||||
|
|
||||||
tty.c_iflag = IGNBRK;
|
tty.c_iflag = IGNBRK;
|
||||||
if (n == 3) { /* with flow control */
|
if (n == 3) { /* with flow control */
|
||||||
tty.c_iflag |= IXOFF;
|
tty.c_iflag |= IXOFF; /* Enable XON/XOFF flow control on input */
|
||||||
tty.c_cflag |= CRTSCTS;
|
// tty.c_cflag |= CRTSCTS; /* hardware flowcontrol */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -357,19 +327,12 @@ int io_mode(int fd, int n)
|
|||||||
* no signal generating chars, and no extended chars (^V,
|
* no signal generating chars, and no extended chars (^V,
|
||||||
* ^O, ^R, ^W).
|
* ^O, ^R, ^W).
|
||||||
*/
|
*/
|
||||||
tty.c_lflag &= ~(ECHO | ICANON | ISIG | IEXTEN);
|
tty.c_lflag = 0; /* Transparant input */
|
||||||
tty.c_oflag = 0; /* Transparent output */
|
tty.c_oflag = 0; /* Transparent output */
|
||||||
|
tty.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD); /* Same baud rate, disable parity */
|
||||||
tty.c_cflag &= ~(PARENB); /* Same baud rate, disable parity */
|
tty.c_cflag |= CS8 | CREAD | HUPCL | CLOCAL;
|
||||||
/* Set character size = 8 */
|
tty.c_cc[VMIN] = 1; /* This many chars satisfies reads */
|
||||||
tty.c_cflag &= ~(CSIZE);
|
tty.c_cc[VTIME] = 0;
|
||||||
tty.c_cflag |= CS8;
|
|
||||||
#ifdef NFGVMIN
|
|
||||||
tty.c_cc[VMIN] = 1; /* This many chars satisfies reads */
|
|
||||||
#else
|
|
||||||
tty.c_cc[VMIN] = HOWMANY; /* This many chars satisfies reads */
|
|
||||||
#endif
|
|
||||||
tty.c_cc[VTIME] = 1; /* or in this many tenths of seconds */
|
|
||||||
tcsetattr(fd,TCSADRAIN,&tty);
|
tcsetattr(fd,TCSADRAIN,&tty);
|
||||||
Baudrate = getspeed(cfgetospeed(&tty));
|
Baudrate = getspeed(cfgetospeed(&tty));
|
||||||
Syslog('t', "Baudrate = %d", Baudrate);
|
Syslog('t', "Baudrate = %d", Baudrate);
|
||||||
|
@ -763,7 +763,7 @@ void zsendline_init(void)
|
|||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
Syslog('z', "zendline_init() Zctlesc=%d", Zctlesc);
|
Syslog('z', "zsendline_init() Zctlesc=%d", Zctlesc);
|
||||||
|
|
||||||
for (i = 0; i < 256; i++) {
|
for (i = 0; i < 256; i++) {
|
||||||
if (i & 0140)
|
if (i & 0140)
|
||||||
@ -796,6 +796,7 @@ void zsendline_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// zsendline_tab[255] = 1; /* IAC */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user