From c11ba794553d45d36f4239d18f8a7b21eda321e4 Mon Sep 17 00:00:00 2001 From: Michiel Broek Date: Sun, 14 Aug 2005 09:31:33 +0000 Subject: [PATCH] Moved getrfcchrs funcyion into mbselib.a --- mbfido/msgutil.c | 4 ++-- mbfido/post.c | 6 +++--- mbfido/rfc2ftn.c | 23 +---------------------- 3 files changed, 6 insertions(+), 27 deletions(-) diff --git a/mbfido/msgutil.c b/mbfido/msgutil.c index eaa0535d..eacf4df6 100644 --- a/mbfido/msgutil.c +++ b/mbfido/msgutil.c @@ -90,9 +90,9 @@ void Msg_Pid(void) sprintf(temp, "\001PID: MBSE-FIDO %s (%s-%s)", VERSION, OsName(), OsCPU()); MsgText_Add2(temp); if (msgs.Charset != FTNC_NONE) { - sprintf(temp, "\001CHRS: %s", getchrs(msgs.Charset)); + sprintf(temp, "\001CHRS: %s", getftnchrs(msgs.Charset)); } else { - sprintf(temp, "\001CHRS: %s", getchrs(FTNC_LATIN_1)); + sprintf(temp, "\001CHRS: %s", getftnchrs(FTNC_LATIN_1)); } MsgText_Add2(temp); tt = time(NULL); diff --git a/mbfido/post.c b/mbfido/post.c index 92896930..d5a55c74 100644 --- a/mbfido/post.c +++ b/mbfido/post.c @@ -4,7 +4,7 @@ * Purpose ...............: Post a message from a file. * ***************************************************************************** - * Copyright (C) 1997-2004 + * Copyright (C) 1997-2005 * * Michiel Broek FIDO: 2:280/2802 * Beekmansbos 10 @@ -220,9 +220,9 @@ int Post(char *To, long Area, char *Subj, char *File, char *Flavor) sprintf(temp, "\001PID: MBSE-FIDO %s (%s-%s)", VERSION, OsName(), OsCPU()); MsgText_Add2(temp); if (msgs.Charset != FTNC_NONE) { - sprintf(temp, "\001CHRS: %s", getchrs(msgs.Charset)); + sprintf(temp, "\001CHRS: %s", getftnchrs(msgs.Charset)); } else { - sprintf(temp, "\001CHRS: %s", getchrs(FTNC_LATIN_1)); + sprintf(temp, "\001CHRS: %s", getftnchrs(FTNC_LATIN_1)); } MsgText_Add2(temp); sprintf(temp, "\001TZUTC: %s", gmtoffset(tt)); diff --git a/mbfido/rfc2ftn.c b/mbfido/rfc2ftn.c index a41766d7..905ebe43 100644 --- a/mbfido/rfc2ftn.c +++ b/mbfido/rfc2ftn.c @@ -79,27 +79,6 @@ extern int most_debug; int needputrfc(rfcmsg *, int); -char *getrfcchrs(int); -char *getrfcchrs(int val) -{ - switch (val) { - case FTNC_NONE: return (char *)"iso-8859-1"; - 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_CP852: return (char *)"cp852"; - case FTNC_CP895: return (char *)"cp895"; - case FTNC_LATIN_1: return (char *)"iso-8859-1"; - case FTNC_LATIN_2: return (char *)"iso-8859-2"; - case FTNC_LATIN_5: return (char *)"iso-8859-5"; - case FTNC_MAC: return (char *)"MAC 2"; - case FTNC_KOI8_R: return (char *)"koi8-r"; - case FTNC_CP936: return (char *)"hz-gb-2312"; - default: return (char *)"iso-8859-1"; - } -} - int charwrite(char *, FILE *); int charwrite(char *s, FILE *fp) @@ -405,7 +384,7 @@ int rfc2ftn(FILE *fp, faddr *recipient) fprintf(ofp, "\1REPLY: %s %08lx\n", fmsg->reply_a, fmsg->reply_n); Now = time(NULL) - (gmt_offset((time_t)0) * 60); fprintf(ofp, "\001TZUTC: %s\n", gmtoffset(Now)); - fprintf(ofp, "\001CHRS: %s\n", getchrs(msgs.Charset)); + fprintf(ofp, "\001CHRS: %s\n", getftnchrs(msgs.Charset)); fmsg->subj = oldsubj; if ((p = hdr((char *)"X-FTN-REPLYADDR",msg))) {