diff --git a/ChangeLog b/ChangeLog index c90796cd..bafd291b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,13 @@ $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. diff --git a/TODO b/TODO index 4c1e3775..8acd29e5 100644 --- a/TODO +++ b/TODO @@ -1,6 +1,6 @@ $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 diff --git a/configure b/configure index 059206aa..592a0c89 100755 --- a/configure +++ b/configure @@ -1305,7 +1305,7 @@ SUBDIRS="lib mbcico mbfido mbmon mbsebbs mbutils mbnntp mbtask mbsetup unix lang PACKAGE="mbsebbs" MAJOR="0" MINOR="83" -REVISION="15" +REVISION="16" VERSION="$MAJOR.$MINOR.$REVISION" COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved" SHORTRIGHT="Copyright (C) 1997-2006 M. Broek" diff --git a/configure.in b/configure.in index aabd655a..7c186892 100644 --- a/configure.in +++ b/configure.in @@ -13,7 +13,7 @@ dnl PACKAGE="mbsebbs" MAJOR="0" MINOR="83" -REVISION="15" +REVISION="16" VERSION="$MAJOR.$MINOR.$REVISION" COPYRIGHT="Copyright (C) 1997-2006 Michiel Broek, All Rights Reserved" SHORTRIGHT="Copyright (C) 1997-2006 M. Broek" diff --git a/mbsebbs/offline.c b/mbsebbs/offline.c index 0a7ececb..0f3aaf05 100644 --- a/mbsebbs/offline.c +++ b/mbsebbs/offline.c @@ -2701,6 +2701,18 @@ void OLR_DownASCII(void) 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; DrawBar(Pktname); 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]; unsigned int Number; int Pack = FALSE; - struct tm *tp; + time_t now; Number = ulLast; Current = Personal = 0L; @@ -2879,35 +2891,53 @@ unsigned int ASCII_PackArea(unsigned int ulLast, int Area, char *Atag) } if (Pack) { - fprintf (fp, "===============================================================================\n"); - fprintf (fp, " Msg: #%d of %d (%s)\n", - Number, Msg_Number(), msgs.Name); - tp = localtime(&Msg.Written); - 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); - fprintf (fp, " From: %s\n", Msg.From); - if (Msg.To[0]) - fprintf (fp, " To: %s\n", Msg.To); - fprintf (fp, " Subj: %s\n", Msg.Subject); + fprintf(fp, "#@ olrmsg\n"); +// fprintf(fp, " Msg: #%d of %d (%s)\n", Number, Msg_Number(), msgs.Name); +// tp = localtime(&Msg.Written); +// 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); + now = (time_t)Msg.Written; + fprintf(fp, "Date: %s\n", rfcdate(now)); + fprintf(fp, "From: %s\n", Msg.From); + if (strlen(Msg.FromAddress)) + 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) { do { if (strncmp(Text, "\001MSGID: ", 8) == 0) { - fprintf (fp, "Msgid: %s\n", Text+8); - break; + fprintf(fp, "Message-ID: %s\n", Text+8); + } + 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); } - fprintf (fp, "-------------------------------------------------------------------------------\n"); + fprintf(fp, "\n"); Current++; Total++; + /* + * Add message body + */ if ((Text = (char *)MsgText_First()) != NULL) { 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); + } } while ((Text = (char *)MsgText_Next()) != NULL); } diff --git a/mbsebbs/openport.c b/mbsebbs/openport.c index 5214150e..0b4394b7 100644 --- a/mbsebbs/openport.c +++ b/mbsebbs/openport.c @@ -55,15 +55,6 @@ int hanged_up = 0; unsigned Baudrate = 2400; 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 { @@ -202,34 +193,13 @@ int io_mode(int fd, int n) } tty = oldtty; - tty.c_iflag = BRKINT|IXON; - - tty.c_oflag = 0; /* Transparent output */ - - 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_iflag = 0; /* Transparant input */ + 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_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; -#else - tty.c_cc[VMIN] = 3; /* This many chars satisfies reads */ -#endif - tty.c_cc[VTIME] = 1; /* or in this many tenths of seconds */ + tty.c_cc[VTIME] = 0; tcsetattr(fd,TCSADRAIN,&tty); @@ -347,8 +317,8 @@ int io_mode(int fd, int n) tty.c_iflag = IGNBRK; if (n == 3) { /* with flow control */ - tty.c_iflag |= IXOFF; - tty.c_cflag |= CRTSCTS; + tty.c_iflag |= IXOFF; /* Enable XON/XOFF flow control on input */ +// 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, * ^O, ^R, ^W). */ - tty.c_lflag &= ~(ECHO | ICANON | ISIG | IEXTEN); - tty.c_oflag = 0; /* Transparent output */ - - tty.c_cflag &= ~(PARENB); /* Same baud rate, disable parity */ - /* Set character size = 8 */ - tty.c_cflag &= ~(CSIZE); - 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 */ + tty.c_lflag = 0; /* Transparant input */ + tty.c_oflag = 0; /* Transparent output */ + tty.c_cflag &= ~(CSIZE | CSTOPB | PARENB | PARODD); /* Same baud rate, disable parity */ + tty.c_cflag |= CS8 | CREAD | HUPCL | CLOCAL; + tty.c_cc[VMIN] = 1; /* This many chars satisfies reads */ + tty.c_cc[VTIME] = 0; tcsetattr(fd,TCSADRAIN,&tty); Baudrate = getspeed(cfgetospeed(&tty)); Syslog('t', "Baudrate = %d", Baudrate); diff --git a/mbsebbs/zmmisc.c b/mbsebbs/zmmisc.c index 97f384b3..9a6fdabb 100644 --- a/mbsebbs/zmmisc.c +++ b/mbsebbs/zmmisc.c @@ -763,7 +763,7 @@ void zsendline_init(void) { int i; - Syslog('z', "zendline_init() Zctlesc=%d", Zctlesc); + Syslog('z', "zsendline_init() Zctlesc=%d", Zctlesc); for (i = 0; i < 256; i++) { if (i & 0140) @@ -796,6 +796,7 @@ void zsendline_init(void) } } } +// zsendline_tab[255] = 1; /* IAC */ }