diff --git a/ChangeLog b/ChangeLog index c600bace..7322e7bb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -22,6 +22,15 @@ v0.51.1 21-Feb-2004 In several places where groups need to be tagged, there is now a switch (*) to select/deslect all groups at once. + mbsebbs: + Writes the ^aCHRS: kludge again in new created messages. + + mbmsg: + Writes the ^aCHRS: kludge again in new created messages. + + mbaff: + Writes the ^aCHRS: kludge again in new created messages. + v0.51.0 09-Feb-2004 - 21-Feb-2004 diff --git a/TODO b/TODO index 5762f38a..6cb07789 100644 --- a/TODO +++ b/TODO @@ -58,7 +58,9 @@ mbsebbs: N: OLR: qwk, check netmail entered from reader, fido address missing? - N: Reimplememnt CHRS kludge. + N: Translate characterset of messages to the users preferred characterset. + + N: Add menu setup to set users preffered character set. N: There are some bugs in the bbs list menu. Make it a door? @@ -67,6 +69,7 @@ newuser: L: Allow handles to be the same as the unixname. + N: Add menu setup to set users preffered character set. mbtask: N: Add a thread that keeps track of disk usage of all partitions used @@ -126,6 +129,9 @@ mbfido: once (virus defs for example) the file is written multiple times in the toberep database and will be multiple times announced. + N: Reimplement characterset conversion again on the gateway using the + iconv library. + mbcico: N: Further investigate binkp tty_error hangup. diff --git a/html/images/emareas.png b/html/images/emareas.png index 17a6974e..a41c8a6f 100644 Binary files a/html/images/emareas.png and b/html/images/emareas.png differ diff --git a/html/images/emgroup.png b/html/images/emgroup.png index 881f1f6d..e42d1718 100644 Binary files a/html/images/emgroup.png and b/html/images/emgroup.png differ diff --git a/html/setup/emareas.html b/html/setup/emareas.html index c83c9b3c..7512359e 100644 --- a/html/setup/emareas.html +++ b/html/setup/emareas.html @@ -14,7 +14,7 @@
-+Last update 30-Sep-2002
Last update 23-Feb-2004
MBSE BBS Setup - Mail Setup -> Mail Areas.
Introduction.
@@ -48,8 +48,7 @@ change netmail reply board and delete message area. Distrib. Leave this blank for now! Area Type Local, Netmail, Echomail or News. Msg Kinds Private/Public, Private, Public, Read Only, FTN moderated, Usenet Moderated -FTN chars FTN characterset, not in use yet, defaults to IBMPC 2 -RFC chars RFC characterset, not in use yet, defaults tp LATIN-1 2 +Charset Default characterset for the area Active If this area is active. Days Old The maximum age of the messages before purging. Max. Msgs The maximum messages in this area. diff --git a/html/setup/emgroup.html b/html/setup/emgroup.html index f79c1494..475c4c60 100644 --- a/html/setup/emgroup.html +++ b/html/setup/emgroup.html @@ -14,7 +14,7 @@-+Last update 30-Sep-2002
Last update 23-Feb-2004
MBSE BBS Setup - Mail Setup - Message Groups.
Introduction.
@@ -55,6 +55,7 @@ skip a number of extra areas for future expansion. Use Aka The Fidonet aka to use. Uplink The Fidonet aka of your uplink. Areas Areas file in the path defined in 1.4.6 screen 2. +Charset Default character set to use.diff --git a/lib/Makefile b/lib/Makefile index c3aabf39..23cd6e53 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -5,13 +5,13 @@ include ../Makefile.global -COMMON_SRCS = clcomm.c client.c crc.c semafore.c signame.c \ +COMMON_SRCS = clcomm.c client.c crc.c semafore.c signame.c charset.c \ attach.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \ batchrd.c ftn.c pktname.c mangle.c sectest.c proglock.c \ dostran.c ftnmsg.c mbfile.c nodelock.c rawio.c strcasestr.c \ execute.c expipe.c getheader.c noderecord.c rfcaddr.c strutil.c \ faddr.c gmtoffset.c packet.c rfcdate.c term.c endian.c timers.c -COMMON_OBJS = clcomm.o client.o crc.o semafore.o signame.o \ +COMMON_OBJS = clcomm.o client.o crc.o semafore.o signame.o charset.o \ ftscprod.o attach.o falists.o hdr.o parsedate.o rfcmsg.o unpacker.o \ batchrd.o ftn.o pktname.o mangle.o sectest.o proglock.o \ dostran.o ftnmsg.o mbfile.o nodelock.o rawio.o strcasestr.o \ diff --git a/lib/charset.c b/lib/charset.c new file mode 100644 index 00000000..1be922d9 --- /dev/null +++ b/lib/charset.c @@ -0,0 +1,68 @@ +/***************************************************************************** + * + * $Id$ + * Purpose ...............: Characterset functions + * + ***************************************************************************** + * 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 "mbselib.h" + + +char *getchrs(int val) +{ + switch (val) { + case FTNC_NONE: return (char *)"Undefined"; + case FTNC_CP437: return (char *)"CP437 2"; + case FTNC_CP850: return (char *)"CP850 2"; + case FTNC_CP865: return (char *)"CP865 2"; + case FTNC_CP866: return (char *)"CP866 2"; + case FTNC_LATIN_1: return (char *)"LATIN-1 2"; + case FTNC_LATIN_2: return (char *)"LATIN-2 2"; + case FTNC_LATIN_5: return (char *)"LATIN-5 2"; + case FTNC_MAC: return (char *)"MAC 2"; + default: return (char *)"LATIN-1 2"; + } +} + + +char *getchrsdesc(int val) +{ + switch (val) { + case FTNC_NONE: return (char *)"Undefined"; + case FTNC_CP437: return (char *)"IBM codepage 437 (Western European) (ANSI terminal)"; + case FTNC_CP850: return (char *)"IBM codepage 850 (Latin-1)"; + case FTNC_CP865: return (char *)"IBM codepage 865 (Nordic)"; + case FTNC_CP866: return (char *)"IBM codepage 866 (Russian)"; + case FTNC_LATIN_1: return (char *)"ISO 8859-1 (Western European)"; + case FTNC_LATIN_2: return (char *)"ISO 8859-2 (Eastern European)"; + case FTNC_LATIN_5: return (char *)"ISO 8859-5 (Turkish)"; + case FTNC_MAC: return (char *)"MacIntosh character set"; + default: return (char *)"ERROR"; + } +} + + diff --git a/lib/mbselib.h b/lib/mbselib.h index bc9d4b33..3be122ec 100644 --- a/lib/mbselib.h +++ b/lib/mbselib.h @@ -2118,30 +2118,38 @@ struct termios tbufs, tbufsavs; /* Structure for raw mode */ /* * From endian.c */ -int le_int(int); +int le_int(int); /* * From attach.c */ -int attach(faddr, char *, int, char); +int attach(faddr, char *, int, char); + + + +/* + * From charset.c + */ +char *getchrs(int); /* Return characterset name */ +char *getchrsdesc(int); /* Return characterset description */ /* * From dostran.c */ -char *Dos2Unix(char *); -char *Unix2Dos(char *); +char *Dos2Unix(char *); +char *Unix2Dos(char *); /* * From execute.c */ -int execute(char *, char *, char *, char *, char *, char *); -int execsh(char *, char *, char *, char *); +int execute(char *, char *, char *, char *, char *, char *); +int execsh(char *, char *, char *, char *); diff --git a/mbfido/msgutil.c b/mbfido/msgutil.c index 44ee041e..e17ad042 100644 --- a/mbfido/msgutil.c +++ b/mbfido/msgutil.c @@ -89,7 +89,12 @@ void Msg_Pid(void) temp = calloc(81, sizeof(char)); sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION); MsgText_Add2(temp); -// sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode)); + if (msgs.Charset != FTNC_NONE) { + sprintf(temp, "\001CHRS: %s", getchrs(msgs.Charset)); + } else { + sprintf(temp, "\001CHRS: %s", getchrs(FTNC_LATIN_1)); + } + MsgText_Add2(temp); tt = time(NULL); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); MsgText_Add2(temp); diff --git a/mbfido/post.c b/mbfido/post.c index 7d67fe08..b1f5ed56 100644 --- a/mbfido/post.c +++ b/mbfido/post.c @@ -191,8 +191,12 @@ void Post(char *To, long Area, char *Subj, char *File, char *Flavor) Msg.ReplyCRC = 0xffffffff; sprintf(temp, "\001PID: MBSE-FIDO %s", VERSION); MsgText_Add2(temp); -// sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode)); -// MsgText_Add2(temp); + if (msgs.Charset != FTNC_NONE) { + sprintf(temp, "\001CHRS: %s", getchrs(msgs.Charset)); + } else { + sprintf(temp, "\001CHRS: %s", getchrs(FTNC_LATIN_1)); + } + MsgText_Add2(temp); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); MsgText_Add2(temp); diff --git a/mbsebbs/msgutil.c b/mbsebbs/msgutil.c index 34516776..1b48699f 100644 --- a/mbsebbs/msgutil.c +++ b/mbsebbs/msgutil.c @@ -219,8 +219,12 @@ void Add_Headkludges(faddr *dest, int IsReply) break; } -// sprintf(temp, "\001CHRS: %s", getchrs(msgs.Ftncode)); -// MsgText_Add2(temp); + if (msgs.Charset != FTNC_NONE) { + sprintf(temp, "\001CHRS: %s", getchrs(msgs.Charset)); + } else { + sprintf(temp, "\001CHRS: %s", getchrs(FTNC_LATIN_1)); + } + MsgText_Add2(temp); sprintf(temp, "\001MSGID: %s %08lx", aka2str(msgs.Aka), sequencer()); MsgText_Add2(temp); Msg.MsgIdCRC = upd_crc32(temp, crc, strlen(temp)); diff --git a/mbsetup/ledit.c b/mbsetup/ledit.c index d2960e30..59a76a34 100644 --- a/mbsetup/ledit.c +++ b/mbsetup/ledit.c @@ -2190,24 +2190,6 @@ char *getmenutype(int val) -char *getchrs(int val) -{ - switch (val) { - case FTNC_NONE: return (char *)"Undefined"; - case FTNC_CP437: return (char *)"CP437"; - case FTNC_CP850: return (char *)"CP850"; - case FTNC_CP865: return (char *)"CP865"; - case FTNC_CP866: return (char *)"CP866"; - case FTNC_LATIN_1: return (char *)"Latin-1"; - case FTNC_LATIN_2: return (char *)"Latin-2"; - case FTNC_LATIN_5: return (char *)"Latin-5"; - case FTNC_MAC: return (char *)"Mac"; - default: return (char *)"ERROR"; - } -} - - - void show_charset(int y, int x, int val) { show_str(y, x, 9, getchrs(val)); diff --git a/mbsetup/ledit.h b/mbsetup/ledit.h index 66ac6968..c7ac7250 100644 --- a/mbsetup/ledit.h +++ b/mbsetup/ledit.h @@ -80,7 +80,6 @@ void show_aka(int, int, fidoaddr); void edit_color(int *, int *, char *, char *); char *get_color(int); char *getmenutype(int); -char *getchrs(int); void show_charset(int, int, int); int edit_charset(int, int, int); diff --git a/mbsetup/m_marea.c b/mbsetup/m_marea.c index 10d08e6d..7d129fff 100644 --- a/mbsetup/m_marea.c +++ b/mbsetup/m_marea.c @@ -294,11 +294,7 @@ void InitMsgRec(void) msgs.Type = ECHOMAIL; msgs.MsgKinds = PUBLIC; msgs.UsrDelete = TRUE; -#ifdef HAVE_ICONV_H msgs.Charset = FTNC_LATIN_1; -#else - msgs.Charset = FTNC_NONE; -#endif msgs.MaxArticles = CFG.maxarticles; strcpy(msgs.Origin, CFG.origin); msgs.LinkSec.level = 1;