Updates for CHRS kludge

This commit is contained in:
Michiel Broek
2004-02-23 15:46:32 +00:00
parent 022bd58797
commit ca6e5dcafa
15 changed files with 122 additions and 41 deletions

View File

@@ -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 \

68
lib/charset.c Normal file
View File

@@ -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";
}
}

View File

@@ -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 *);