Updated libraries headers
This commit is contained in:
parent
752e53f0d7
commit
4cccb85e31
136
lib/Makefile
136
lib/Makefile
@ -4,26 +4,26 @@
|
|||||||
|
|
||||||
include ../Makefile.global
|
include ../Makefile.global
|
||||||
|
|
||||||
CLCOMM_SRCS = clcomm.c client.c crc.c semafore.c signame.c
|
|
||||||
CLCOMM_OBJS = clcomm.o client.o crc.o semafore.o signame.o
|
COMMON_SRCS = clcomm.c client.c crc.c semafore.c signame.c \
|
||||||
CLCOMM_HDRS = clcomm.h
|
attach.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \
|
||||||
COMMON_SRCS = attach.c falists.c hdr.c parsedate.c rfcmsg.c unpacker.c \
|
|
||||||
batchrd.c ftn.c pktname.c mangle.c sectest.c proglock.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 \
|
dostran.c ftnmsg.c mbfile.c nodelock.c rawio.c strcasestr.c \
|
||||||
execute.c expipe.c getheader.c noderecord.c rfcaddr.c strutil.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
|
faddr.c gmtoffset.c packet.c rfcdate.c term.c endian.c timers.c
|
||||||
COMMON_OBJS = ftscprod.o attach.o falists.o hdr.o parsedate.o rfcmsg.o unpacker.o \
|
COMMON_OBJS = clcomm.o client.o crc.o semafore.o signame.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 \
|
batchrd.o ftn.o pktname.o mangle.o sectest.o proglock.o \
|
||||||
dostran.o ftnmsg.o mbfile.o nodelock.o rawio.o strcasestr.o \
|
dostran.o ftnmsg.o mbfile.o nodelock.o rawio.o strcasestr.o \
|
||||||
execute.o expipe.o getheader.o noderecord.o rfcaddr.o strutil.o \
|
execute.o expipe.o getheader.o noderecord.o rfcaddr.o strutil.o \
|
||||||
faddr.o gmtoffset.o packet.o rfcdate.o term.o endian.o timers.o
|
faddr.o gmtoffset.o packet.o rfcdate.o term.o endian.o timers.o
|
||||||
COMMON_HDRS = common.h
|
COMMON_HDRS = mbselib.h
|
||||||
NODELIST_SRCS = nodelist.c
|
NODELIST_SRCS = nodelist.c
|
||||||
NODELIST_OBJS = nodelist.o
|
NODELIST_OBJS = nodelist.o
|
||||||
NODELIST_HDRS = nodelist.h
|
NODELIST_HDRS = nodelist.h
|
||||||
DBASE_SRCS = dbcfg.c dbdupe.c dbftn.c dbmsgs.c dbnode.c dbtic.c dbuser.c
|
DBASE_SRCS = dbcfg.c dbdupe.c dbftn.c dbmsgs.c dbnode.c dbtic.c dbuser.c
|
||||||
DBASE_OBJS = dbcfg.o dbdupe.o dbftn.o dbmsgs.o dbnode.o dbtic.o dbuser.o
|
DBASE_OBJS = dbcfg.o dbdupe.o dbftn.o dbmsgs.o dbnode.o dbtic.o dbuser.o
|
||||||
DBASE_HDRS = dbcfg.h dbdupe.h dbftn.h dbmsgs.h dbnode.h dbtic.h dbuser.h
|
DBASE_HDRS = mbsedb.h
|
||||||
MSGBASE_SRCS = jammsg.c msg.c msgtext.c
|
MSGBASE_SRCS = jammsg.c msg.c msgtext.c
|
||||||
MSGBASE_OBJS = jammsg.o msg.o msgtext.o
|
MSGBASE_OBJS = jammsg.o msg.o msgtext.o
|
||||||
MSGBASE_HDRS = jam.h jammsg.h jamsys.h msg.h msgtext.h
|
MSGBASE_HDRS = jam.h jammsg.h jamsys.h msg.h msgtext.h
|
||||||
@ -33,16 +33,16 @@ MBINET_HDRS = mbinet.h
|
|||||||
DIESEL_SRCS = diesel.c mbdiesel.c
|
DIESEL_SRCS = diesel.c mbdiesel.c
|
||||||
DIESEL_HDRS = diesel.h
|
DIESEL_HDRS = diesel.h
|
||||||
DIESEL_OBJS = diesel.o mbdiesel.o
|
DIESEL_OBJS = diesel.o mbdiesel.o
|
||||||
OTHER_HDRS = ansi.h bluewave.h libs.h mbse.h records.h structs.h users.h mberrors.h
|
OTHER_HDRS = bluewave.h mbse.h users.h
|
||||||
SRCS = ${CLCOMM_SRCS} ${COMMON_SRCS} ${DBASE_SRCS} ${MSGBASE_SRCS} ${MBINET_SRCS} \
|
SRCS = ${COMMON_SRCS} ${DBASE_SRCS} ${MSGBASE_SRCS} ${MBINET_SRCS} \
|
||||||
${DIESEL_SRCS} ${NODELIST_SRCS}
|
${DIESEL_SRCS} ${NODELIST_SRCS}
|
||||||
OBJS = ${CLCOMM_OBJS} ${COMMON_OBJS} ${DBASE_OBJS} ${MSGBASE_OBJS} ${MBINET_OBJS} \
|
OBJS = ${COMMON_OBJS} ${DBASE_OBJS} ${MSGBASE_OBJS} ${MBINET_OBJS} \
|
||||||
${DIESEL_OBJS} ${NODELIST_OBJS}
|
${DIESEL_OBJS} ${NODELIST_OBJS}
|
||||||
HDRS = ${CLCOMM_HDRS} ${COMMON_HDRS} ${DBASE_HDRS} ${MSGBASE_HDRS} ${MBINET_HDRS} \
|
HDRS = ${COMMON_HDRS} ${DBASE_HDRS} ${MSGBASE_HDRS} ${MBINET_HDRS} \
|
||||||
${DIESEL_HDRS} ${NODELIST_HDRS} ${OTHER_HDRS}
|
${DIESEL_HDRS} ${NODELIST_HDRS} ${OTHER_HDRS}
|
||||||
OTHER = Makefile README ftscprod.008 mkprod.awk \
|
OTHER = Makefile README ftscprod.008 mkprod.awk \
|
||||||
README.diesel README.macro Diesel.doc nodelist.conf
|
README.diesel README.macro Diesel.doc nodelist.conf
|
||||||
TARGET = libclcomm.a libcommon.a libdbase.a libmsgbase.a libmbinet.a libdiesel.a \
|
TARGET = libmbse.a libdbase.a libmsgbase.a libmbinet.a libdiesel.a \
|
||||||
libnodelist.a
|
libnodelist.a
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
@ -55,11 +55,7 @@ all: ${TARGET}
|
|||||||
ftscprod.c: ftscprod.??? mkprod.awk
|
ftscprod.c: ftscprod.??? mkprod.awk
|
||||||
${AWK} -F, -f mkprod.awk ftscprod.??? >ftscprod.c
|
${AWK} -F, -f mkprod.awk ftscprod.??? >ftscprod.c
|
||||||
|
|
||||||
libclcomm.a: ${CLCOMM_OBJS}
|
libmbse.a: ${COMMON_OBJS}
|
||||||
ar r $@ $?
|
|
||||||
${RANLIB} $@
|
|
||||||
|
|
||||||
libcommon.a: ${COMMON_OBJS}
|
|
||||||
ar r $@ $?
|
ar r $@ $?
|
||||||
${RANLIB} $@
|
${RANLIB} $@
|
||||||
|
|
||||||
@ -117,57 +113,57 @@ depend: ftscprod.c
|
|||||||
|
|
||||||
# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
|
# DO NOT DELETE THIS LINE - MAKE DEPEND RELIES ON IT
|
||||||
# Dependencies generated by make depend
|
# Dependencies generated by make depend
|
||||||
clcomm.o: ../config.h libs.h mberrors.h clcomm.h
|
clcomm.o: ../config.h mbselib.h
|
||||||
client.o: ../config.h libs.h clcomm.h
|
client.o: ../config.h mbselib.h
|
||||||
crc.o: ../config.h libs.h clcomm.h
|
crc.o: ../config.h mbselib.h
|
||||||
semafore.o: ../config.h libs.h structs.h clcomm.h common.h
|
semafore.o: ../config.h mbselib.h
|
||||||
signame.o: ../config.h libs.h clcomm.h
|
signame.o: ../config.h mbselib.h
|
||||||
attach.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
attach.o: ../config.h mbselib.h
|
||||||
falists.o: ../config.h libs.h structs.h clcomm.h common.h
|
falists.o: ../config.h mbselib.h
|
||||||
hdr.o: ../config.h libs.h structs.h common.h
|
hdr.o: ../config.h mbselib.h
|
||||||
parsedate.o: ../config.h libs.h structs.h common.h
|
parsedate.o: ../config.h mbselib.h
|
||||||
rfcmsg.o: ../config.h libs.h structs.h users.h records.h common.h clcomm.h
|
rfcmsg.o: ../config.h mbselib.h
|
||||||
unpacker.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
unpacker.o: ../config.h mbselib.h
|
||||||
batchrd.o: ../config.h libs.h structs.h clcomm.h common.h
|
batchrd.o: ../config.h mbselib.h
|
||||||
ftn.o: ../config.h libs.h structs.h users.h records.h clcomm.h dbftn.h common.h
|
ftn.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
pktname.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
pktname.o: ../config.h mbselib.h
|
||||||
mangle.o: ../config.h libs.h structs.h clcomm.h common.h
|
mangle.o: ../config.h mbselib.h
|
||||||
sectest.o: ../config.h libs.h structs.h common.h clcomm.h
|
sectest.o: ../config.h mbselib.h
|
||||||
proglock.o: ../config.h ../lib/libs.h ../lib/structs.h ../lib/users.h ../lib/records.h ../lib/common.h ../lib/clcomm.h
|
proglock.o: ../config.h mbselib.h
|
||||||
dostran.o: ../config.h libs.h structs.h users.h records.h common.h
|
dostran.o: ../config.h mbselib.h
|
||||||
ftnmsg.o: ../config.h libs.h structs.h common.h clcomm.h
|
ftnmsg.o: ../config.h mbselib.h
|
||||||
mbfile.o: ../config.h libs.h structs.h clcomm.h common.h
|
mbfile.o: ../config.h mbselib.h
|
||||||
nodelock.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
nodelock.o: ../config.h mbselib.h
|
||||||
rawio.o: ../config.h libs.h structs.h common.h mberrors.h
|
rawio.o: ../config.h mbselib.h
|
||||||
strcasestr.o: ../config.h libs.h
|
strcasestr.o: ../config.h mbselib.h
|
||||||
execute.o: ../config.h libs.h structs.h clcomm.h mberrors.h common.h
|
execute.o: ../config.h mbselib.h
|
||||||
expipe.o: ../config.h libs.h structs.h clcomm.h mberrors.h common.h
|
expipe.o: ../config.h mbselib.h
|
||||||
getheader.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
getheader.o: ../config.h mbselib.h
|
||||||
noderecord.o: ../config.h libs.h structs.h common.h users.h records.h dbnode.h common.h
|
noderecord.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
rfcaddr.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h
|
rfcaddr.o: ../config.h mbselib.h
|
||||||
strutil.o: ../config.h libs.h structs.h common.h
|
strutil.o: ../config.h mbselib.h
|
||||||
faddr.o: ../config.h libs.h structs.h common.h
|
faddr.o: ../config.h mbselib.h
|
||||||
gmtoffset.o: ../config.h libs.h structs.h common.h
|
gmtoffset.o: ../config.h mbselib.h
|
||||||
packet.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h dbnode.h
|
packet.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
rfcdate.o: ../config.h libs.h structs.h common.h clcomm.h
|
rfcdate.o: ../config.h mbselib.h
|
||||||
term.o: ../config.h libs.h structs.h users.h ansi.h records.h common.h
|
term.o: ../config.h mbselib.h users.h
|
||||||
endian.o: ../config.h libs.h structs.h common.h
|
endian.o: ../config.h mbselib.h
|
||||||
timers.o: ../config.h libs.h structs.h clcomm.h common.h
|
timers.o: ../config.h mbselib.h
|
||||||
dbcfg.o: ../config.h libs.h mbse.h structs.h users.h records.h mberrors.h dbcfg.h
|
dbcfg.o: ../config.h mbselib.h mbse.h users.h mbsedb.h
|
||||||
dbdupe.o: ../config.h libs.h structs.h clcomm.h mberrors.h dbdupe.h
|
dbdupe.o: ../config.h mbselib.h mbse.h users.h mbsedb.h
|
||||||
dbftn.o: ../config.h libs.h structs.h users.h records.h dbcfg.h dbftn.h
|
dbftn.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
dbmsgs.o: ../config.h libs.h structs.h users.h records.h clcomm.h dbcfg.h dbmsgs.h
|
dbmsgs.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
dbnode.o: ../config.h libs.h structs.h common.h users.h records.h clcomm.h dbcfg.h dbnode.h
|
dbnode.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
dbtic.o: ../config.h libs.h structs.h users.h records.h clcomm.h dbcfg.h dbtic.h
|
dbtic.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
dbuser.o: ../config.h libs.h structs.h users.h records.h dbcfg.h dbuser.h
|
dbuser.o: ../config.h mbselib.h users.h mbsedb.h
|
||||||
jammsg.o: ../config.h libs.h clcomm.h msgtext.h structs.h common.h msg.h jam.h jammsg.h
|
jammsg.o: ../config.h mbselib.h msgtext.h msg.h jam.h jammsg.h
|
||||||
msg.o: ../config.h libs.h msgtext.h msg.h clcomm.h structs.h common.h jammsg.h
|
msg.o: ../config.h mbselib.h msgtext.h msg.h jammsg.h
|
||||||
msgtext.o: ../config.h libs.h msgtext.h msg.h
|
msgtext.o: ../config.h mbselib.h msgtext.h msg.h
|
||||||
nntp.o: ../config.h libs.h structs.h users.h records.h clcomm.h mbinet.h
|
nntp.o: ../config.h mbselib.h mbinet.h
|
||||||
pop3.o: ../config.h libs.h structs.h users.h records.h clcomm.h mbinet.h
|
pop3.o: ../config.h mbselib.h mbinet.h
|
||||||
smtp.o: ../config.h libs.h structs.h users.h records.h clcomm.h mbinet.h
|
smtp.o: ../config.h mbselib.h mbinet.h
|
||||||
diesel.o: ../config.h libs.h diesel.h
|
diesel.o: ../config.h mbselib.h diesel.h
|
||||||
mbdiesel.o: ../config.h libs.h structs.h users.h records.h common.h clcomm.h diesel.h
|
mbdiesel.o: ../config.h mbselib.h diesel.h
|
||||||
nodelist.o: ../config.h libs.h structs.h users.h records.h clcomm.h common.h mberrors.h nodelist.h
|
nodelist.o: ../config.h mbselib.h nodelist.h
|
||||||
ftscprod.o: ../config.h libs.h structs.h common.h
|
ftscprod.o: ../config.h mbselib.h
|
||||||
# End of generated dependencies
|
# End of generated dependencies
|
||||||
|
56
lib/ansi.h
56
lib/ansi.h
@ -1,56 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* File ..................: mbse.h
|
|
||||||
* Purpose ...............: ANSI Screen definitions
|
|
||||||
* Last modification date : 10-Feb-1999
|
|
||||||
*
|
|
||||||
*****************************************************************************
|
|
||||||
* Copyright (C) 1997-1999
|
|
||||||
*
|
|
||||||
* Michiel Broek FIDO: 2:2801/16
|
|
||||||
* Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl
|
|
||||||
* 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.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
#ifndef _ANSI_H
|
|
||||||
#define _ANSI_H
|
|
||||||
|
|
||||||
|
|
||||||
#define ANSI_RED "\x1B[31;1m"
|
|
||||||
#define ANSI_YELLOW "\x1B[33;1m"
|
|
||||||
#define ANSI_BLUE "\x1B[34;1m"
|
|
||||||
#define ANSI_GREEN "\x1B[32;1m"
|
|
||||||
#define ANSI_WHITE "\x1B[37;1m"
|
|
||||||
#define ANSI_CYAN "\x1B[36;1m"
|
|
||||||
#define ANSI_MAGENTA "\x1B[35m"
|
|
||||||
|
|
||||||
#define ANSI_HOME "\x1B[H"
|
|
||||||
#define ANSI_UP "\x1B[A"
|
|
||||||
#define ANSI_DOWN "\x1B[B"
|
|
||||||
#define ANSI_RIGHT "\x1B[C"
|
|
||||||
#define ANSI_LEFT "\x1B[D"
|
|
||||||
|
|
||||||
#define ANSI_BOLD "\x1B[1m"
|
|
||||||
#define ANSI_NORMAL "\x1B[0m"
|
|
||||||
#define ANSI_CLEAR "\x1B[2J"
|
|
||||||
#define ANSI_CLREOL "\x1B[K"
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: common/batchrd.c
|
* $Id$
|
||||||
* Purpose ...............: Batch reading
|
* Purpose ...............: Batch reading
|
||||||
* Last modification date : 28-Aug-2000
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2000
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
static long counter = 0L;
|
static long counter = 0L;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Client/Server communications
|
* Purpose ...............: Client/Server communications
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,9 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "mberrors.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
int do_quiet = FALSE; /* Quiet flag */
|
int do_quiet = FALSE; /* Quiet flag */
|
||||||
|
117
lib/clcomm.h
117
lib/clcomm.h
@ -1,117 +0,0 @@
|
|||||||
#ifndef _CLCOMM_H
|
|
||||||
#define _CLCOMM_H
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
#define SS_BUFSIZE 1024 /* Socket buffersize */
|
|
||||||
#define MBSE_SS(x) (x)?(x):"(null)"
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Logging flagbits, ' ' ? ! + -
|
|
||||||
*/
|
|
||||||
#define DLOG_ALLWAYS 0x00000001
|
|
||||||
#define DLOG_ERROR 0x00000002
|
|
||||||
#define DLOG_ATTENT 0x00000004
|
|
||||||
#define DLOG_NORMAL 0x00000008
|
|
||||||
#define DLOG_VERBOSE 0x00000010
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Debug levels: A B C D E F H I L M N O P R S T X Z
|
|
||||||
*/
|
|
||||||
#define DLOG_TCP 0x00000020
|
|
||||||
#define DLOG_BBS 0x00000040
|
|
||||||
#define DLOG_CHAT 0x00000080
|
|
||||||
#define DLOG_DEVIO 0x00000100
|
|
||||||
#define DLOG_EXEC 0x00000200
|
|
||||||
#define DLOG_FILEFWD 0x00000400
|
|
||||||
#define DLOG_HYDRA 0x00001000
|
|
||||||
#define DLOG_IEMSI 0x00002000
|
|
||||||
#define DLOG_LOCK 0x00010000
|
|
||||||
#define DLOG_MAIL 0x00020000
|
|
||||||
#define DLOG_NODELIST 0x00040000
|
|
||||||
#define DLOG_OUTSCAN 0x00080000
|
|
||||||
#define DLOG_PACK 0x00100000
|
|
||||||
#define DLOG_ROUTE 0x00400000
|
|
||||||
#define DLOG_SESSION 0x00800000
|
|
||||||
#define DLOG_TTY 0x01000000
|
|
||||||
#define DLOG_XMODEM 0x10000000
|
|
||||||
#define DLOG_ZMODEM 0x40000000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _srv_auth {
|
|
||||||
struct _srv_auth *next;
|
|
||||||
char *hostname;
|
|
||||||
char *authcode;
|
|
||||||
} srv_auth;
|
|
||||||
|
|
||||||
|
|
||||||
extern char SigName[32][16];
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From clcomm.c
|
|
||||||
*/
|
|
||||||
char *xmalloc(size_t);
|
|
||||||
char *xstrcpy(char *);
|
|
||||||
char *xstrcat(char *, char *);
|
|
||||||
void InitClient(char *, char *, char *, char *, long, char *, char *, char *);
|
|
||||||
void ExitClient(int);
|
|
||||||
void SockS(const char *, ...);
|
|
||||||
char *SockR(const char *, ...);
|
|
||||||
void WriteError(const char *, ...);
|
|
||||||
void Syslog(int, const char *, ...);
|
|
||||||
void Syslogp(int, char *);
|
|
||||||
void Mgrlog(const char *, ...);
|
|
||||||
void RegTCP(void);
|
|
||||||
void IsDoing(const char *, ...);
|
|
||||||
void SetTTY(char *);
|
|
||||||
void UserCity(pid_t, char *, char *);
|
|
||||||
void DoNop(void);
|
|
||||||
void Nopper(void);
|
|
||||||
void Altime(int);
|
|
||||||
unsigned long sequencer(void);
|
|
||||||
char *printable(char *, int);
|
|
||||||
char *printablec(char);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From client.c
|
|
||||||
*/
|
|
||||||
int socket_connect(char *, char *, char *);
|
|
||||||
int socket_send(char *);
|
|
||||||
char *socket_receive(void);
|
|
||||||
int socket_shutdown(pid_t);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From crc.c
|
|
||||||
*/
|
|
||||||
unsigned long crc32ccitt(char *, int);
|
|
||||||
unsigned short crc16ccitt(char *, int);
|
|
||||||
unsigned long str_crc32(char *str);
|
|
||||||
unsigned long StringCRC32(char *);
|
|
||||||
unsigned long upd_crc32(char *buf, unsigned long crc, int len);
|
|
||||||
unsigned long norm_crc32(unsigned long crc);
|
|
||||||
unsigned short crc16xmodem(char *, int);
|
|
||||||
unsigned char checksum(char *, int);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* from semafore.c
|
|
||||||
*/
|
|
||||||
void CreateSema(char *);
|
|
||||||
void RemoveSema(char *);
|
|
||||||
int IsSema(char *);
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE Deamon Client
|
* Purpose ...............: MBSE Deamon Client
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1993-2003
|
* Copyright (C) 1993-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,8 +29,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
static int sock = -1; /* Unix Datagram socket */
|
static int sock = -1; /* Unix Datagram socket */
|
||||||
struct sockaddr_un clntaddr; /* Client socket address */
|
struct sockaddr_un clntaddr; /* Client socket address */
|
||||||
|
519
lib/common.h
519
lib/common.h
@ -1,519 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
#ifndef _COMMON_H
|
|
||||||
#define _COMMON_H
|
|
||||||
|
|
||||||
#include "../config.h"
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
#define PRODCODE 0x11ff /* Official MBSE FTSC product code */
|
|
||||||
|
|
||||||
#define LEAVE 0
|
|
||||||
#define KFS 1
|
|
||||||
#define TFS 2
|
|
||||||
#define DSF 3
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXNAME 35
|
|
||||||
#define MAXUFLAGS 16
|
|
||||||
|
|
||||||
|
|
||||||
#define METRIC_EQUAL 0
|
|
||||||
#define METRIC_POINT 1
|
|
||||||
#define METRIC_NODE 2
|
|
||||||
#define METRIC_NET 3
|
|
||||||
#define METRIC_ZONE 4
|
|
||||||
#define METRIC_DOMAIN 5
|
|
||||||
#define METRIC_MAX METRIC_DOMAIN
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Fidonet message status bits
|
|
||||||
*/
|
|
||||||
#define M_PVT 0x0001
|
|
||||||
#define M_CRASH 0x0002
|
|
||||||
#define M_RCVD 0x0004
|
|
||||||
#define M_SENT 0x0008
|
|
||||||
#define M_FILE 0x0010
|
|
||||||
#define M_TRANSIT 0x0020
|
|
||||||
#define M_ORPHAN 0x0040
|
|
||||||
#define M_KILLSENT 0x0080
|
|
||||||
#define M_LOCAL 0x0100
|
|
||||||
#define M_HOLD 0x0200
|
|
||||||
#define M_REQ 0x0800
|
|
||||||
#define M_RRQ 0x1000
|
|
||||||
#define M_IRR 0x2000
|
|
||||||
#define M_AUDIT 0x4000
|
|
||||||
#define M_FILUPD 0x8000
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Returned function keys
|
|
||||||
*/
|
|
||||||
#define KEY_BACKSPACE 8
|
|
||||||
#define KEY_LINEFEED 10
|
|
||||||
#define KEY_ENTER 13
|
|
||||||
#define KEY_ESCAPE 27
|
|
||||||
#define KEY_RUBOUT 127
|
|
||||||
#define KEY_UP 200
|
|
||||||
#define KEY_DOWN 201
|
|
||||||
#define KEY_LEFT 202
|
|
||||||
#define KEY_RIGHT 203
|
|
||||||
#define KEY_HOME 204
|
|
||||||
#define KEY_END 205
|
|
||||||
#define KEY_INS 206
|
|
||||||
#define KEY_DEL 207
|
|
||||||
#define KEY_PGUP 208
|
|
||||||
#define KEY_PGDN 209
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef LINES
|
|
||||||
#define LINES 24
|
|
||||||
#endif
|
|
||||||
#ifndef COLS
|
|
||||||
#define COLS 80
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* ANSI colors
|
|
||||||
*/
|
|
||||||
#define BLACK 0
|
|
||||||
#define BLUE 1
|
|
||||||
#define GREEN 2
|
|
||||||
#define CYAN 3
|
|
||||||
#define RED 4
|
|
||||||
#define MAGENTA 5
|
|
||||||
#define BROWN 6
|
|
||||||
#define LIGHTGRAY 7
|
|
||||||
#define DARKGRAY 8
|
|
||||||
#define LIGHTBLUE 9
|
|
||||||
#define LIGHTGREEN 10
|
|
||||||
#define LIGHTCYAN 11
|
|
||||||
#define LIGHTRED 12
|
|
||||||
#define LIGHTMAGENTA 13
|
|
||||||
#define YELLOW 14
|
|
||||||
#define WHITE 15
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXSUBJ 71
|
|
||||||
#define MSGTYPE 2
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _parsedaddr {
|
|
||||||
char *target;
|
|
||||||
char *remainder;
|
|
||||||
char *comment;
|
|
||||||
} parsedaddr;
|
|
||||||
|
|
||||||
|
|
||||||
#define ADDR_NESTED 1
|
|
||||||
#define ADDR_MULTIPLE 2
|
|
||||||
#define ADDR_UNMATCHED 4
|
|
||||||
#define ADDR_BADTOKEN 8
|
|
||||||
#define ADDR_BADSTRUCT 16
|
|
||||||
#define ADDR_ERRMAX 5
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From rfcaddr.c
|
|
||||||
*/
|
|
||||||
char *addrerrstr(int);
|
|
||||||
void tidyrfcaddr(parsedaddr);
|
|
||||||
parsedaddr parserfcaddr(char *);
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _faddr {
|
|
||||||
char *name;
|
|
||||||
unsigned int point;
|
|
||||||
unsigned int node;
|
|
||||||
unsigned int net;
|
|
||||||
unsigned int zone;
|
|
||||||
char *domain;
|
|
||||||
} faddr;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _fa_list {
|
|
||||||
struct _fa_list *next;
|
|
||||||
faddr *addr;
|
|
||||||
int force;
|
|
||||||
} fa_list;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
typedef struct _ftnmsg {
|
|
||||||
int flags;
|
|
||||||
int ftnorigin;
|
|
||||||
faddr *to;
|
|
||||||
faddr *from;
|
|
||||||
time_t date;
|
|
||||||
char *subj;
|
|
||||||
char *msgid_s;
|
|
||||||
char *msgid_a;
|
|
||||||
unsigned long msgid_n;
|
|
||||||
char *reply_s;
|
|
||||||
char *reply_a;
|
|
||||||
unsigned long reply_n;
|
|
||||||
char *origin;
|
|
||||||
char *area;
|
|
||||||
} ftnmsg;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern struct _ftscprod {
|
|
||||||
unsigned short code;
|
|
||||||
char *name;
|
|
||||||
} ftscprod[];
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
extern char SigName[32][16];
|
|
||||||
|
|
||||||
|
|
||||||
int ttyfd; /* Filedescriptor for raw mode */
|
|
||||||
struct termios tbufs, tbufsavs; /* Structure for raw mode */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From endian.c
|
|
||||||
*/
|
|
||||||
int le_int(int);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From attach.c
|
|
||||||
*/
|
|
||||||
int attach(faddr, char *, int, char);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From dostran.c
|
|
||||||
*/
|
|
||||||
char *Dos2Unix(char *);
|
|
||||||
char *Unix2Dos(char *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From execute.c
|
|
||||||
*/
|
|
||||||
int execute(char *, char *, char *, char *, char *, char *);
|
|
||||||
int execsh(char *, char *, char *, char *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From expipe.c
|
|
||||||
*/
|
|
||||||
FILE *expipe(char *, char *, char *);
|
|
||||||
int exclose(FILE *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From faddr.c
|
|
||||||
*/
|
|
||||||
char *aka2str(fidoaddr aka);
|
|
||||||
fidoaddr str2aka(char *addr);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From falists.c
|
|
||||||
*/
|
|
||||||
void tidy_falist(fa_list **);
|
|
||||||
void fill_list(fa_list **,char *,fa_list **);
|
|
||||||
void fill_path(fa_list **,char *);
|
|
||||||
void sort_list(fa_list **);
|
|
||||||
void uniq_list(fa_list **);
|
|
||||||
int in_list(faddr *,fa_list **, int);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From ftn.c
|
|
||||||
*/
|
|
||||||
faddr *parsefnode(char *);
|
|
||||||
faddr *parsefaddr(char *);
|
|
||||||
char *ascinode(faddr *,int);
|
|
||||||
char *ascfnode(faddr *,int);
|
|
||||||
void tidy_faddr(faddr *);
|
|
||||||
int metric(faddr *, faddr *);
|
|
||||||
faddr *fido2faddr(fidoaddr);
|
|
||||||
fidoaddr *faddr2fido(faddr *);
|
|
||||||
faddr *bestaka_s(faddr *);
|
|
||||||
int is_local(faddr *);
|
|
||||||
int chkftnmsgid(char *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From getheader.c
|
|
||||||
*/
|
|
||||||
int getheader(faddr *, faddr *, FILE *, char *, int);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From gmtoffset.c
|
|
||||||
*/
|
|
||||||
long gmt_offset(time_t);
|
|
||||||
char *gmtoffset(time_t);
|
|
||||||
char *str_time(time_t);
|
|
||||||
char *t_elapsed(time_t, time_t);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From mbfile.c
|
|
||||||
*/
|
|
||||||
int file_cp(char *from, char *to);
|
|
||||||
int file_rm(char *path);
|
|
||||||
int file_mv(char *oldpath, char *newpath);
|
|
||||||
int file_exist(char *path, int mode);
|
|
||||||
long file_size(char *path);
|
|
||||||
long file_crc(char *path, int);
|
|
||||||
time_t file_time(char *path);
|
|
||||||
int mkdirs(char *name, mode_t);
|
|
||||||
int diskfree(int);
|
|
||||||
int getfilecase(char *, char *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From nodelock.c
|
|
||||||
*/
|
|
||||||
int nodelock(faddr *, pid_t);
|
|
||||||
int nodeulock(faddr *, pid_t);
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From noderecord.c
|
|
||||||
*/
|
|
||||||
int noderecord(faddr *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From pktname.c
|
|
||||||
*/
|
|
||||||
char *pktname(faddr *, char);
|
|
||||||
char *reqname(faddr *);
|
|
||||||
char *floname(faddr *, char);
|
|
||||||
char *splname(faddr *);
|
|
||||||
char *bsyname(faddr *);
|
|
||||||
char *stsname(faddr *);
|
|
||||||
char *polname(faddr *);
|
|
||||||
char *dayname(void);
|
|
||||||
char *arcname(faddr *, unsigned short, int);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From rawio.c
|
|
||||||
*/
|
|
||||||
void Setraw(void); /* Set raw mode */
|
|
||||||
void Unsetraw(void); /* Unset raw mode */
|
|
||||||
unsigned char Getone(void); /* Get one raw character */
|
|
||||||
long Speed(void); /* Get (locked) tty speed */
|
|
||||||
int Waitchar(unsigned char *, int); /* Wait n * 10mSec for char */
|
|
||||||
int Escapechar(unsigned char *); /* Escape sequence test */
|
|
||||||
unsigned char Readkey(void); /* Read a translated key */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From strutil.c
|
|
||||||
*/
|
|
||||||
char *padleft(char *str, int size, char pad);
|
|
||||||
char *tl(char *str);
|
|
||||||
void Striplf(char *String);
|
|
||||||
void tlf(char *str);
|
|
||||||
char *tu(char *str);
|
|
||||||
char *tlcap(char *);
|
|
||||||
char *Hilite(char *, char *);
|
|
||||||
void Addunderscore(char *);
|
|
||||||
void strreplace(char *, char *, char*);
|
|
||||||
char *GetLocalHM(void);
|
|
||||||
char *StrTimeHM(time_t);
|
|
||||||
char *StrTimeHMS(time_t);
|
|
||||||
char *GetLocalHMS(void);
|
|
||||||
char *StrDateMDY(time_t *);
|
|
||||||
char *StrDateDMY(time_t);
|
|
||||||
char *GetDateDMY(void);
|
|
||||||
char *OsName(void);
|
|
||||||
char *OsCPU(void);
|
|
||||||
char *TearLine(void);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From term.c
|
|
||||||
*/
|
|
||||||
void TermInit(int);
|
|
||||||
void Enter(int);
|
|
||||||
void pout(int, int, char *);
|
|
||||||
void poutCR(int, int, char *);
|
|
||||||
void poutCenter(int,int,char *);
|
|
||||||
void colour(int, int);
|
|
||||||
void Center(char *);
|
|
||||||
void clear(void);
|
|
||||||
void locate(int, int);
|
|
||||||
void fLine(int);
|
|
||||||
void sLine(void);
|
|
||||||
void mvprintw(int, int, const char *, ...);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From unpacker.c
|
|
||||||
*/
|
|
||||||
char *unpacker(char *);
|
|
||||||
int getarchiver(char *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From packet.c
|
|
||||||
*/
|
|
||||||
FILE *openpkt(FILE *, faddr *, char, int);
|
|
||||||
void closepkt(void);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From ftnmsg.c
|
|
||||||
*/
|
|
||||||
char *ftndate(time_t);
|
|
||||||
FILE *ftnmsghdr(ftnmsg *,FILE *,faddr *,char, char *);
|
|
||||||
void tidy_ftnmsg(ftnmsg *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From rfcdate.c
|
|
||||||
*/
|
|
||||||
time_t parsefdate(char *, void *);
|
|
||||||
char *rfcdate(time_t);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From rfcmsg.c
|
|
||||||
*/
|
|
||||||
|
|
||||||
typedef struct _rfcmsg {
|
|
||||||
struct _rfcmsg *next;
|
|
||||||
char *key;
|
|
||||||
char *val;
|
|
||||||
} rfcmsg;
|
|
||||||
|
|
||||||
rfcmsg *parsrfc(FILE *);
|
|
||||||
void tidyrfc(rfcmsg *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From hdr.c
|
|
||||||
*/
|
|
||||||
char *hdr(char *, rfcmsg *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* From batchrd.c
|
|
||||||
*/
|
|
||||||
char *bgets(char *, int, FILE *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* parsedate.c
|
|
||||||
*/
|
|
||||||
typedef struct _TIMEINFO {
|
|
||||||
time_t time;
|
|
||||||
long usec;
|
|
||||||
long tzone;
|
|
||||||
} TIMEINFO;
|
|
||||||
|
|
||||||
/*
|
|
||||||
** Meridian: am, pm, or 24-hour style.
|
|
||||||
*/
|
|
||||||
typedef enum _MERIDIAN {
|
|
||||||
MERam, MERpm, MER24
|
|
||||||
} MERIDIAN;
|
|
||||||
|
|
||||||
|
|
||||||
typedef union {
|
|
||||||
time_t Number;
|
|
||||||
enum _MERIDIAN Meridian;
|
|
||||||
} CYYSTYPE;
|
|
||||||
|
|
||||||
#define tDAY 257
|
|
||||||
#define tDAYZONE 258
|
|
||||||
#define tMERIDIAN 259
|
|
||||||
#define tMONTH 260
|
|
||||||
#define tMONTH_UNIT 261
|
|
||||||
#define tSEC_UNIT 262
|
|
||||||
#define tSNUMBER 263
|
|
||||||
#define tUNUMBER 264
|
|
||||||
#define tZONE 265
|
|
||||||
|
|
||||||
|
|
||||||
extern CYYSTYPE cyylval;
|
|
||||||
|
|
||||||
|
|
||||||
time_t parsedate(char *, TIMEINFO *);
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* strcasestr.c
|
|
||||||
*/
|
|
||||||
#ifndef HAVE_STRCASESTR
|
|
||||||
char *strcasestr(char *, char *);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* mangle.c
|
|
||||||
*/
|
|
||||||
void mangle_name_83( char *); /* Mangle name to 8.3 format */
|
|
||||||
void name_mangle(char *); /* Mangle name or make uppercase */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* sectest.c
|
|
||||||
*/
|
|
||||||
int Access(securityrec, securityrec); /* Check security access */
|
|
||||||
int Le_Access(securityrec, securityrec); /* Endian independant */
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* proglock.c
|
|
||||||
*/
|
|
||||||
int lockprogram(char *); /* Lock a program */
|
|
||||||
void ulockprogram(char *); /* Unlock a program */
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
* timers.c
|
|
||||||
*/
|
|
||||||
int gpt_resettimer(int); /* Reset timer no */
|
|
||||||
void gpt_resettimers(void); /* Reset all timers */
|
|
||||||
int gpt_settimer(int, int); /* Set timer no to time */
|
|
||||||
int gpt_expired(int); /* Is timer expired */
|
|
||||||
int gpt_running(int); /* Is timer running */
|
|
||||||
int msleep(int); /* Milliseconds timer */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* $Id$
|
* $Id$
|
||||||
* File ..................: crc.c
|
|
||||||
* Purpose ...............: Crc32 and Crc16 calculations
|
* Purpose ...............: Crc32 and Crc16 calculations
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1993-2003
|
* Copyright (C) 1993-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,8 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Config Database.
|
* Purpose ...............: Config Database.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,13 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "mbse.h"
|
#include "mbse.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "mberrors.h"
|
|
||||||
#include "dbcfg.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
lib/dbcfg.h
11
lib/dbcfg.h
@ -1,11 +0,0 @@
|
|||||||
#ifndef _DBCFG_H
|
|
||||||
#define _DBCFG_H
|
|
||||||
|
|
||||||
|
|
||||||
void InitConfig(void); /* Initialize and load config */
|
|
||||||
void LoadConfig(void); /* Only load config file */
|
|
||||||
int IsOurAka(fidoaddr); /* Check if our aka */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -29,11 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
#include "mbse.h"
|
||||||
#include "clcomm.h"
|
#include "users.h"
|
||||||
#include "mberrors.h"
|
#include "mbsedb.h"
|
||||||
#include "dbdupe.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
12
lib/dbdupe.h
12
lib/dbdupe.h
@ -1,12 +0,0 @@
|
|||||||
#ifndef _DBDUPE_H
|
|
||||||
#define _DBDUPE_H
|
|
||||||
|
|
||||||
typedef enum {D_ECHOMAIL, D_FILEECHO, D_NEWS} DUPETYPE;
|
|
||||||
|
|
||||||
void InitDupes(void);
|
|
||||||
int CheckDupe(unsigned long, int, int);
|
|
||||||
void CloseDupes(void);
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Fidonetrecord Access
|
* Purpose ...............: Fidonetrecord Access
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,12 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "dbcfg.h"
|
|
||||||
#include "dbftn.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
16
lib/dbftn.h
16
lib/dbftn.h
@ -1,16 +0,0 @@
|
|||||||
#ifndef _DBFTN_H
|
|
||||||
#define _DBFTN_H
|
|
||||||
|
|
||||||
|
|
||||||
struct _fidonethdr fidonethdr; /* Header record */
|
|
||||||
struct _fidonet fidonet; /* Fidonet datarecord */
|
|
||||||
int fidonet_cnt; /* Fidonet records in database */
|
|
||||||
char fidonet_fil[81];/* Fidonet database filename */
|
|
||||||
|
|
||||||
int InitFidonet(void); /* Initialize fidonet database */
|
|
||||||
int TestFidonet(unsigned short); /* Test if zone is in memory */
|
|
||||||
int SearchFidonet(unsigned short); /* Search specified zone and load */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
10
lib/dbmsgs.c
10
lib/dbmsgs.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Message areas record Access
|
* Purpose ...............: Message areas record Access
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,13 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "dbcfg.h"
|
|
||||||
#include "dbmsgs.h"
|
|
||||||
|
|
||||||
|
|
||||||
char msgs_fil[PATH_MAX]; /* Database filename */
|
char msgs_fil[PATH_MAX]; /* Database filename */
|
||||||
|
21
lib/dbmsgs.h
21
lib/dbmsgs.h
@ -1,21 +0,0 @@
|
|||||||
#ifndef _DBMSGS_H
|
|
||||||
#define _DBMSGS_H
|
|
||||||
|
|
||||||
|
|
||||||
struct msgareashdr msgshdr; /* Header record */
|
|
||||||
struct msgareas msgs; /* Msgss datarecord */
|
|
||||||
struct _mgrouphdr mgrouphdr; /* Group header record */
|
|
||||||
struct _mgroup mgroup; /* Group record */
|
|
||||||
int msgs_cnt; /* Msgs records in database */
|
|
||||||
|
|
||||||
int InitMsgs(void); /* Initialize msgs database */
|
|
||||||
int SearchMsgs(char *); /* Search specified msg area */
|
|
||||||
int SearchMsgsNews(char *); /* Search specified msg area */
|
|
||||||
int MsgSystemConnected(sysconnect); /* Is system connected */
|
|
||||||
int MsgSystemConnect(sysconnect *, int); /* Connect/change/delete system*/
|
|
||||||
int GetMsgSystem(sysconnect *, int);/* Get connected system */
|
|
||||||
int SearchNetBoard(unsigned short, unsigned short); /* Search netmail */
|
|
||||||
void UpdateMsgs(void); /* Update current messages record */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
12
lib/dbnode.c
12
lib/dbnode.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Noderecord Access
|
* Purpose ...............: Noderecord Access
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,14 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "dbcfg.h"
|
|
||||||
#include "dbnode.h"
|
|
||||||
|
|
||||||
|
|
||||||
char nodes_fil[PATH_MAX]; /* Nodes database filename */
|
char nodes_fil[PATH_MAX]; /* Nodes database filename */
|
||||||
|
21
lib/dbnode.h
21
lib/dbnode.h
@ -1,21 +0,0 @@
|
|||||||
/* $Id$ */
|
|
||||||
|
|
||||||
#ifndef _DBNODE_H
|
|
||||||
#define _DBNODE_H
|
|
||||||
|
|
||||||
|
|
||||||
struct _nodeshdr nodeshdr; /* Header record */
|
|
||||||
struct _nodes nodes; /* Nodes datarecord */
|
|
||||||
int nodes_cnt; /* Node records in database */
|
|
||||||
|
|
||||||
int InitNode(void); /* Initialize nodes database */
|
|
||||||
int TestNode(fidoaddr); /* Check if noderecord is loaded */
|
|
||||||
int SearchNodeFaddr(faddr *); /* Search specified node and load */
|
|
||||||
int SearchNode(fidoaddr); /* Search specified node and load */
|
|
||||||
int UpdateNode(void); /* Update record if changed. */
|
|
||||||
char *GetNodeMailGrp(int); /* Get nodes mailgroup record */
|
|
||||||
char *GetNodeFileGrp(int); /* Get nodes filegroup record */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
11
lib/dbtic.c
11
lib/dbtic.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Tic areas record Access
|
* Purpose ...............: Tic areas record Access
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,13 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "dbcfg.h"
|
|
||||||
#include "dbtic.h"
|
|
||||||
|
|
||||||
|
|
||||||
char tic_fil[PATH_MAX]; /* Database filename */
|
char tic_fil[PATH_MAX]; /* Database filename */
|
||||||
|
19
lib/dbtic.h
19
lib/dbtic.h
@ -1,19 +0,0 @@
|
|||||||
#ifndef _DBTIC_H
|
|
||||||
#define _DBTIC_H
|
|
||||||
|
|
||||||
|
|
||||||
struct _tichdr tichdr; /* Header record */
|
|
||||||
struct _tic tic; /* Tics datarecord */
|
|
||||||
struct _fgrouphdr fgrouphdr; /* Group header record */
|
|
||||||
struct _fgroup fgroup; /* Group record */
|
|
||||||
int tic_cnt; /* Tic records in database */
|
|
||||||
|
|
||||||
int InitTic(void); /* Initialize tic database */
|
|
||||||
int SearchTic(char *); /* Search specified msg are */
|
|
||||||
int TicSystemConnected(sysconnect); /* Is system connected */
|
|
||||||
int TicSystemConnect(sysconnect *, int); /* Connect/change/delete system*/
|
|
||||||
int GetTicSystem(sysconnect *, int);/* Get connected system */
|
|
||||||
void UpdateTic(void); /* Update current messages record */
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -29,12 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "dbcfg.h"
|
|
||||||
#include "dbuser.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
16
lib/dbuser.h
16
lib/dbuser.h
@ -1,16 +0,0 @@
|
|||||||
#ifndef _DBUSER_H
|
|
||||||
#define _DBUSER_H
|
|
||||||
|
|
||||||
|
|
||||||
struct userhdr usrhdr; /* Header record */
|
|
||||||
struct userrec usr; /* User datarecord */
|
|
||||||
int usr_cnt; /* User records in database */
|
|
||||||
char usr_fil[81]; /* User database filename */
|
|
||||||
|
|
||||||
int InitUser(void); /* Initialize user database */
|
|
||||||
int TestUser(char *); /* Test if user is in memory */
|
|
||||||
int SearchUser(char *); /* Search specified user and load */
|
|
||||||
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: TURBODIESEL Macro language
|
* Purpose ...............: TURBODIESEL Macro language
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -327,7 +327,7 @@ documented above, in outstring.
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "diesel.h"
|
#include "diesel.h"
|
||||||
|
|
||||||
/* Get(<var>, <structure_type>) allocates a new <structure_type> and
|
/* Get(<var>, <structure_type>) allocates a new <structure_type> and
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: DOS to Unix filename translation
|
* Purpose ...............: DOS to Unix filename translation
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
char *Dos2Unix(char *dosname)
|
char *Dos2Unix(char *dosname)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Change integer value CPU endian independant
|
* Purpose ...............: Change integer value CPU endian independant
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,9 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "mberrors.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
int e_pid = 0; /* Execute child pid */
|
int e_pid = 0; /* Execute child pid */
|
||||||
@ -41,16 +37,16 @@ int e_pid = 0; /* Execute child pid */
|
|||||||
|
|
||||||
|
|
||||||
int _execute(char *, char *, char *, char *, char *, char *);
|
int _execute(char *, char *, char *, char *, char *, char *);
|
||||||
int _execute(char *cmd, char *file, char *pkt, char *in, char *out, char *err)
|
int _execute(char *cmd, char *fil, char *pkt, char *in, char *out, char *err)
|
||||||
{
|
{
|
||||||
char buf[PATH_MAX];
|
char buf[PATH_MAX];
|
||||||
char *vector[16];
|
char *vector[16];
|
||||||
int i, pid, status = 0, rc = 0;
|
int i, pid, status = 0, rc = 0;
|
||||||
|
|
||||||
if (pkt == NULL)
|
if (pkt == NULL)
|
||||||
sprintf(buf, "%s %s", cmd, file);
|
sprintf(buf, "%s %s", cmd, fil);
|
||||||
else
|
else
|
||||||
sprintf(buf, "%s %s %s", cmd, file, pkt);
|
sprintf(buf, "%s %s %s", cmd, fil, pkt);
|
||||||
Syslog('+', "Execute: %s",buf);
|
Syslog('+', "Execute: %s",buf);
|
||||||
|
|
||||||
memset(vector, 0, sizeof(vector));
|
memset(vector, 0, sizeof(vector));
|
||||||
@ -133,7 +129,7 @@ int _execute(char *cmd, char *file, char *pkt, char *in, char *out, char *err)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
int execute(char *cmd, char *file, char *pkt, char *in, char *out, char *err)
|
int execute(char *cmd, char *fil, char *pkt, char *in, char *out, char *err)
|
||||||
{
|
{
|
||||||
int rc;
|
int rc;
|
||||||
|
|
||||||
@ -141,7 +137,7 @@ int execute(char *cmd, char *file, char *pkt, char *in, char *out, char *err)
|
|||||||
sync();
|
sync();
|
||||||
#endif
|
#endif
|
||||||
msleep(300);
|
msleep(300);
|
||||||
rc = _execute(cmd, file, pkt, in, out, err);
|
rc = _execute(cmd, fil, pkt, in, out, err);
|
||||||
#ifdef __linux__
|
#ifdef __linux__
|
||||||
sync();
|
sync();
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Execute pipe
|
* Purpose ...............: MBSE BBS Execute pipe
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "mberrors.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Fidonet Address conversions.
|
* Purpose ...............: Fidonet Address conversions.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1993-2002
|
* Copyright (C) 1993-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,9 +29,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
*
|
*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: SEEN-BY and PATH lists
|
* Purpose ...............: SEEN-BY and PATH lists
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
11
lib/ftn.c
11
lib/ftn.c
@ -5,7 +5,7 @@
|
|||||||
* Remark ................: From ifmail with patches from P.Saratxaga
|
* Remark ................: From ifmail with patches from P.Saratxaga
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,16 +29,11 @@
|
|||||||
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define DB_FIDONET
|
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "dbftn.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef MAXUSHORT
|
#ifndef MAXUSHORT
|
||||||
|
15
lib/ftnmsg.c
15
lib/ftnmsg.c
@ -5,7 +5,7 @@
|
|||||||
* Purpose ...............: Fidonet mailer
|
* Purpose ...............: Fidonet mailer
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,10 +30,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -62,7 +59,7 @@ char *ftndate(time_t t)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FILE *ftnmsghdr(ftnmsg *fmsg, FILE *pkt, faddr *route, char flavor, char *Pid)
|
FILE *ftnmsghdr(ftnmsg *fmsg, FILE *pkt, faddr *routeaddr, char flavor, char *Pid)
|
||||||
{
|
{
|
||||||
unsigned char buffer[0x0e];
|
unsigned char buffer[0x0e];
|
||||||
time_t Now;
|
time_t Now;
|
||||||
@ -73,9 +70,9 @@ FILE *ftnmsghdr(ftnmsg *fmsg, FILE *pkt, faddr *route, char flavor, char *Pid)
|
|||||||
(strlen(fmsg->subj) > 72))
|
(strlen(fmsg->subj) > 72))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (route == NULL)
|
if (routeaddr == NULL)
|
||||||
route = fmsg->to;
|
routeaddr = fmsg->to;
|
||||||
pkt = openpkt(pkt, route, flavor, FALSE);
|
pkt = openpkt(pkt, routeaddr, flavor, FALSE);
|
||||||
if (pkt == NULL)
|
if (pkt == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Read fidonet .pkt header
|
* Purpose ...............: Read fidonet .pkt header
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -28,15 +28,9 @@
|
|||||||
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define DB_NODES
|
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
faddr pktfrom;
|
faddr pktfrom;
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* Source ................: Eugene G. Crosser's ifmail package.
|
* Source ................: Eugene G. Crosser's ifmail package.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,9 +30,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: hdr.c
|
* $Id$
|
||||||
* Purpose ...............: Header parser
|
* Purpose ...............: Header parser
|
||||||
* Last modification date : 22-Mar-2001
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,9 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,11 +35,8 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "msgtext.h"
|
#include "msgtext.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
#include "jam.h"
|
#include "jam.h"
|
||||||
#include "jammsg.h"
|
#include "jammsg.h"
|
||||||
|
94
lib/libs.h
94
lib/libs.h
@ -1,94 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* File ..................: libs.h
|
|
||||||
* Purpose ...............: Libraries include list
|
|
||||||
*
|
|
||||||
*****************************************************************************
|
|
||||||
* Copyright (C) 1997-2003
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _LIBS_H
|
|
||||||
#define _LIBS_H
|
|
||||||
|
|
||||||
#ifndef _GNU_SOURCE
|
|
||||||
#define _GNU_SOURCE 1
|
|
||||||
#endif
|
|
||||||
#define _REGEX_RE_COMP
|
|
||||||
|
|
||||||
#define TRUE 1
|
|
||||||
#define FALSE 0
|
|
||||||
|
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <signal.h>
|
|
||||||
#include <sys/types.h>
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <sys/fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <termios.h>
|
|
||||||
#include <sys/stat.h>
|
|
||||||
#include <sys/wait.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
#include <utime.h>
|
|
||||||
#include <stdarg.h>
|
|
||||||
#include <pwd.h>
|
|
||||||
#include <netdb.h>
|
|
||||||
#ifdef SHADOW_PASSWORD
|
|
||||||
#include <shadow.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/ioctl.h>
|
|
||||||
#ifdef HAVE_SYS_VFS_H
|
|
||||||
#include <sys/vfs.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/param.h>
|
|
||||||
#include <sys/mount.h>
|
|
||||||
#include <sys/utsname.h>
|
|
||||||
#include <sys/file.h>
|
|
||||||
#include <syslog.h>
|
|
||||||
#include <netinet/in.h>
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <arpa/ftp.h>
|
|
||||||
#include <arpa/telnet.h>
|
|
||||||
#include <sys/un.h>
|
|
||||||
#include <sys/time.h>
|
|
||||||
#include <regex.h>
|
|
||||||
#include <setjmp.h>
|
|
||||||
#include <grp.h>
|
|
||||||
#include <sys/resource.h>
|
|
||||||
#ifdef HAVE_ZLIB_H
|
|
||||||
#include <zlib.h>
|
|
||||||
#endif
|
|
||||||
#include <pthread.h>
|
|
||||||
|
|
||||||
#pragma pack(1)
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -31,10 +31,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -29,14 +29,10 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "diesel.h"
|
#include "diesel.h"
|
||||||
|
|
||||||
|
|
||||||
static int firstrandom = TRUE;
|
static int firstrandom = TRUE;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,46 +0,0 @@
|
|||||||
#ifndef _MBERRORS_H
|
|
||||||
#define _MBERRORS_H
|
|
||||||
|
|
||||||
/* $Id$ */
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Exit status values
|
|
||||||
*/
|
|
||||||
#define MBERR_OK 0 /* No errors */
|
|
||||||
#define MBERR_COMMANDLINE 100 /* Commandline error */
|
|
||||||
#define MBERR_CONFIG_ERROR 101 /* Configuration error */
|
|
||||||
#define MBERR_INIT_ERROR 102 /* Initialisation error */
|
|
||||||
#define MBERR_DISK_FULL 103 /* Some disk partition full */
|
|
||||||
#define MBERR_UPS_ALARM 104 /* UPS alarm detected */
|
|
||||||
#define MBERR_NO_RECIPIENTS 105 /* No valid recipients */
|
|
||||||
#define MBERR_EXEC_FAILED 106 /* Execute external prog failed */
|
|
||||||
#define MBERR_TTYIO_ERROR 107 /* Set tty failed */
|
|
||||||
#define MBERR_FTRANSFER 108 /* File transfer error */
|
|
||||||
#define MBERR_ATTACH_FAILED 109 /* File attach failed */
|
|
||||||
#define MBERR_NO_PROGLOCK 110 /* Cannot lock program, retry later */
|
|
||||||
#define MBERR_NODE_NOT_IN_LIST 111 /* Node not in nodelist */
|
|
||||||
#define MBERR_NODE_MAY_NOT_CALL 112 /* Node may not be called */
|
|
||||||
#define MBERR_NO_CONNECTION 113 /* Cannot make connection */
|
|
||||||
#define MBERR_PORTERROR 114 /* Cannot open tty port */
|
|
||||||
#define MBERR_NODE_LOCKED 115 /* Node is locked */
|
|
||||||
#define MBERR_NO_IP_ADDRESS 116 /* Node IP address not found */
|
|
||||||
#define MBERR_UNKNOWN_SESSION 117 /* Unknown session */
|
|
||||||
#define MBERR_NOT_ZMH 118 /* Not Zone Mail Hour */
|
|
||||||
#define MBERR_MODEM_ERROR 119 /* Modem error */
|
|
||||||
#define MBERR_NO_PORT_AVAILABLE 120 /* No modemport available */
|
|
||||||
#define MBERR_SESSION_ERROR 121 /* Session error (password) */
|
|
||||||
#define MBERR_EMSI 122 /* EMSI session error */
|
|
||||||
#define MBERR_FTSC 123 /* FTSC session error */
|
|
||||||
#define MBERR_WAZOO 124 /* WAZOO session error */
|
|
||||||
#define MBERR_YOOHOO 125 /* YOOHOO session error */
|
|
||||||
#define MBERR_OUTBOUND_SCAN 126 /* Outbound scan error */
|
|
||||||
#define MBERR_CANNOT_MAKE_POLL 127 /* Cannot make poll */
|
|
||||||
#define MBERR_REQUEST 128 /* File request error */
|
|
||||||
#define MBERR_DIFF_ERROR 129 /* Error processing nodediff */
|
|
||||||
#define MBERR_VIRUS_FOUND 130 /* Virus found */
|
|
||||||
#define MBERR_GENERAL 131 /* General error */
|
|
||||||
#define MBERR_TIMEOUT 132 /* Timeout error */
|
|
||||||
#define MBERR_TTYIO 200 /* Base for ttyio errors */
|
|
||||||
#define MBERR_EXTERNAL 256 /* Status external prog + 256 */
|
|
||||||
|
|
||||||
#endif
|
|
11
lib/mbfile.c
11
lib/mbfile.c
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -349,7 +346,7 @@ int diskfree(int needed)
|
|||||||
* directory and return the filename with the correct case. This is
|
* directory and return the filename with the correct case. This is
|
||||||
* to be able to detect filename.ext, FILENAME.EXT and FiLeNaMe.ExT
|
* to be able to detect filename.ext, FILENAME.EXT and FiLeNaMe.ExT
|
||||||
*/
|
*/
|
||||||
int getfilecase(char *path, char *file)
|
int getfilecase(char *path, char *fil)
|
||||||
{
|
{
|
||||||
DIR *dp;
|
DIR *dp;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
@ -361,9 +358,9 @@ int getfilecase(char *path, char *file)
|
|||||||
}
|
}
|
||||||
|
|
||||||
while ((de = readdir(dp))) {
|
while ((de = readdir(dp))) {
|
||||||
if (strcasecmp(de->d_name, file) == 0) {
|
if (strcasecmp(de->d_name, fil) == 0) {
|
||||||
for (i = 0; i < strlen(de->d_name); i++)
|
for (i = 0; i < strlen(de->d_name); i++)
|
||||||
file[i] = de->d_name[i];
|
fil[i] = de->d_name[i];
|
||||||
rc = TRUE;
|
rc = TRUE;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
136
lib/mbsedb.h
Normal file
136
lib/mbsedb.h
Normal file
@ -0,0 +1,136 @@
|
|||||||
|
/*****************************************************************************
|
||||||
|
*
|
||||||
|
& $Id$
|
||||||
|
* Purpose ...............: MBSE BBS database library header
|
||||||
|
*
|
||||||
|
*****************************************************************************
|
||||||
|
* 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.
|
||||||
|
*****************************************************************************/
|
||||||
|
|
||||||
|
#ifndef _MBSEDB_H
|
||||||
|
#define _MBSEDB_H
|
||||||
|
|
||||||
|
|
||||||
|
void InitConfig(void); /* Initialize and load config */
|
||||||
|
void LoadConfig(void); /* Only load config file */
|
||||||
|
int IsOurAka(fidoaddr); /* Check if our aka */
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Dupes database type
|
||||||
|
*/
|
||||||
|
typedef enum {D_ECHOMAIL, D_FILEECHO, D_NEWS} DUPETYPE;
|
||||||
|
|
||||||
|
void InitDupes(void);
|
||||||
|
int CheckDupe(unsigned long, int, int);
|
||||||
|
void CloseDupes(void);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fidonet database
|
||||||
|
*/
|
||||||
|
struct _fidonethdr fidonethdr; /* Header record */
|
||||||
|
struct _fidonet fidonet; /* Fidonet datarecord */
|
||||||
|
int fidonet_cnt; /* Fidonet records in database */
|
||||||
|
char fidonet_fil[81];/* Fidonet database filename */
|
||||||
|
|
||||||
|
int InitFidonet(void); /* Initialize fidonet database */
|
||||||
|
int TestFidonet(unsigned short); /* Test if zone is in memory */
|
||||||
|
int SearchFidonet(unsigned short); /* Search specified zone and load */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Nodes database
|
||||||
|
*/
|
||||||
|
struct _nodeshdr nodeshdr; /* Header record */
|
||||||
|
struct _nodes nodes; /* Nodes datarecord */
|
||||||
|
int nodes_cnt; /* Node records in database */
|
||||||
|
|
||||||
|
int InitNode(void); /* Initialize nodes database */
|
||||||
|
int TestNode(fidoaddr); /* Check if noderecord is loaded */
|
||||||
|
int SearchNodeFaddr(faddr *); /* Search specified node and load */
|
||||||
|
int SearchNode(fidoaddr); /* Search specified node and load */
|
||||||
|
int UpdateNode(void); /* Update record if changed. */
|
||||||
|
char *GetNodeMailGrp(int); /* Get nodes mailgroup record */
|
||||||
|
char *GetNodeFileGrp(int); /* Get nodes filegroup record */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* TIC area database
|
||||||
|
*/
|
||||||
|
struct _tichdr tichdr; /* Header record */
|
||||||
|
struct _tic tic; /* Tics datarecord */
|
||||||
|
struct _fgrouphdr fgrouphdr; /* Group header record */
|
||||||
|
struct _fgroup fgroup; /* Group record */
|
||||||
|
int tic_cnt; /* Tic records in database */
|
||||||
|
|
||||||
|
int InitTic(void); /* Initialize tic database */
|
||||||
|
int SearchTic(char *); /* Search specified msg are */
|
||||||
|
int TicSystemConnected(sysconnect); /* Is system connected */
|
||||||
|
int TicSystemConnect(sysconnect *, int); /* Connect/change/delete system*/
|
||||||
|
int GetTicSystem(sysconnect *, int);/* Get connected system */
|
||||||
|
void UpdateTic(void); /* Update current messages record */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* User records
|
||||||
|
*/
|
||||||
|
struct userhdr usrhdr; /* Header record */
|
||||||
|
struct userrec usr; /* User datarecord */
|
||||||
|
int usr_cnt; /* User records in database */
|
||||||
|
char usr_fil[81]; /* User database filename */
|
||||||
|
|
||||||
|
int InitUser(void); /* Initialize user database */
|
||||||
|
int TestUser(char *); /* Test if user is in memory */
|
||||||
|
int SearchUser(char *); /* Search specified user and load */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Message areas database
|
||||||
|
*/
|
||||||
|
struct msgareashdr msgshdr; /* Header record */
|
||||||
|
struct msgareas msgs; /* Msgss datarecord */
|
||||||
|
struct _mgrouphdr mgrouphdr; /* Group header record */
|
||||||
|
struct _mgroup mgroup; /* Group record */
|
||||||
|
int msgs_cnt; /* Msgs records in database */
|
||||||
|
|
||||||
|
int InitMsgs(void); /* Initialize msgs database */
|
||||||
|
int SearchMsgs(char *); /* Search specified msg area */
|
||||||
|
int SearchMsgsNews(char *); /* Search specified msg area */
|
||||||
|
int MsgSystemConnected(sysconnect); /* Is system connected */
|
||||||
|
int MsgSystemConnect(sysconnect *, int); /* Connect/change/delete system*/
|
||||||
|
int GetMsgSystem(sysconnect *, int);/* Get connected system */
|
||||||
|
int SearchNetBoard(unsigned short, unsigned short); /* Search netmail */
|
||||||
|
void UpdateMsgs(void); /* Update current messages record */
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
2460
lib/mbselib.h
Normal file
2460
lib/mbselib.h
Normal file
File diff suppressed because it is too large
Load Diff
@ -3,9 +3,7 @@
|
|||||||
|
|
||||||
BEGIN {
|
BEGIN {
|
||||||
print "#include \"../config.h\""
|
print "#include \"../config.h\""
|
||||||
print "#include \"libs.h\""
|
print "#include \"mbselib.h\""
|
||||||
print "#include \"structs.h\""
|
|
||||||
print "#include \"common.h\""
|
|
||||||
print ""
|
print ""
|
||||||
print "struct _ftscprod ftscprod[] = {"
|
print "struct _ftscprod ftscprod[] = {"
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Global message base functions
|
* Purpose ...............: Global message base functions
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,12 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "msgtext.h"
|
#include "msgtext.h"
|
||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "jammsg.h"
|
#include "jammsg.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: msgtext.c
|
* $Id$
|
||||||
* Purpose ...............: Message text memory storage.
|
* Purpose ...............: Message text memory storage.
|
||||||
* Last modification date : 18-Dec-1999
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-1999
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:2801/16
|
* Michiel Broek FIDO: 2:2801/16
|
||||||
* Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl
|
* Beekmansbos 10 Internet: mbroek@ux123.pttnwb.nl
|
||||||
@ -30,7 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "msgtext.h"
|
#include "msgtext.h"
|
||||||
#include "msg.h"
|
#include "msg.h"
|
||||||
|
|
||||||
|
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "mbinet.h"
|
#include "mbinet.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,13 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "mberrors.h"
|
|
||||||
#include "nodelist.h"
|
#include "nodelist.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Node locking
|
* Purpose ...............: Node locking
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Load noderecord
|
* Purpose ...............: Load noderecord
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,13 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "dbnode.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
10
lib/packet.c
10
lib/packet.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Fidonet mailer
|
* Purpose ...............: Fidonet mailer
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,13 +29,9 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "records.h"
|
#include "mbsedb.h"
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "dbnode.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -20,9 +20,7 @@
|
|||||||
/* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */
|
/* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef PATH_MAX
|
#ifndef PATH_MAX
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Internet Library
|
* Purpose ...............: MBSE BBS Internet Library
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "mbinet.h"
|
#include "mbinet.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Program Locking
|
* Purpose ...............: Program Locking
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2003
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "../lib/libs.h"
|
#include "mbselib.h"
|
||||||
#include "../lib/structs.h"
|
|
||||||
#include "../lib/users.h"
|
|
||||||
#include "../lib/records.h"
|
|
||||||
#include "../lib/common.h"
|
|
||||||
#include "../lib/clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
extern int do_quiet; /* Quiet flag */
|
extern int do_quiet; /* Quiet flag */
|
||||||
|
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "mberrors.h"
|
|
||||||
|
|
||||||
|
|
||||||
int rawset = FALSE;
|
int rawset = FALSE;
|
||||||
|
119
lib/records.h
119
lib/records.h
@ -1,119 +0,0 @@
|
|||||||
/*****************************************************************************
|
|
||||||
*
|
|
||||||
* $Id$
|
|
||||||
* Purpose ...............: MBSE BBS Global records structure
|
|
||||||
*
|
|
||||||
*****************************************************************************
|
|
||||||
* Copyright (C) 1997-2003
|
|
||||||
*
|
|
||||||
* 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.
|
|
||||||
*****************************************************************************/
|
|
||||||
|
|
||||||
|
|
||||||
#ifndef _RECORDS_H
|
|
||||||
#define _RECORDS_H
|
|
||||||
|
|
||||||
struct userhdr usrconfighdr; /* Users database */
|
|
||||||
struct userrec usrconfig;
|
|
||||||
struct userrec exitinfo; /* Users online data */
|
|
||||||
|
|
||||||
struct servicehdr servhdr; /* Services database */
|
|
||||||
struct servicerec servrec;
|
|
||||||
|
|
||||||
struct sysrec SYSINFO; /* System info statistics */
|
|
||||||
|
|
||||||
struct prothdr PROThdr; /* Transfer protocols */
|
|
||||||
struct prot PROT;
|
|
||||||
|
|
||||||
struct onelinehdr olhdr; /* Oneliner database */
|
|
||||||
struct oneline ol;
|
|
||||||
|
|
||||||
struct fileareashdr areahdr; /* File areas */
|
|
||||||
struct fileareas area;
|
|
||||||
struct FILERecord file;
|
|
||||||
struct _fgrouphdr fgrouphdr; /* File groups */
|
|
||||||
struct _fgroup fgroup;
|
|
||||||
|
|
||||||
struct _ngrouphdr ngrouphdr; /* Newfiles groups */
|
|
||||||
struct _ngroup ngroup;
|
|
||||||
|
|
||||||
struct bbslisthdr bbshdr; /* BBS list */
|
|
||||||
struct bbslist bbs;
|
|
||||||
|
|
||||||
struct lastcallershdr LCALLhdr; /* Lastcallers info */
|
|
||||||
struct lastcallers LCALL;
|
|
||||||
|
|
||||||
struct sysconfig CFG; /* System configuration */
|
|
||||||
|
|
||||||
struct limitshdr LIMIThdr; /* User limits */
|
|
||||||
struct limits LIMIT;
|
|
||||||
|
|
||||||
struct menufile menus;
|
|
||||||
|
|
||||||
struct msgareashdr msgshdr; /* Messages configuration */
|
|
||||||
struct msgareas msgs;
|
|
||||||
struct _mgrouphdr mgrouphdr; /* Message groups */
|
|
||||||
struct _mgroup mgroup;
|
|
||||||
|
|
||||||
struct languagehdr langhdr; /* Language data */
|
|
||||||
struct language lang;
|
|
||||||
struct langdata ldata;
|
|
||||||
|
|
||||||
struct _fidonethdr fidonethdr; /* Fidonet structure */
|
|
||||||
struct _fidonet fidonet;
|
|
||||||
struct domhdr domainhdr;
|
|
||||||
struct domrec domtrans;
|
|
||||||
|
|
||||||
struct _archiverhdr archiverhdr; /* Archivers */
|
|
||||||
struct _archiver archiver;
|
|
||||||
|
|
||||||
struct _virscanhdr virscanhdr; /* Virus scanners */
|
|
||||||
struct _virscan virscan;
|
|
||||||
|
|
||||||
struct _ttyinfohdr ttyinfohdr; /* TTY lines */
|
|
||||||
struct _ttyinfo ttyinfo;
|
|
||||||
struct _modemhdr modemhdr; /* Modem models */
|
|
||||||
struct _modem modem;
|
|
||||||
|
|
||||||
struct _tichdr tichdr; /* TIC areas */
|
|
||||||
struct _tic tic;
|
|
||||||
struct _hatchhdr hatchhdr; /* Hatch areas */
|
|
||||||
struct _hatch hatch;
|
|
||||||
struct _magichdr magichdr; /* Magic areas */
|
|
||||||
struct _magic magic;
|
|
||||||
|
|
||||||
struct _nodeshdr nodeshdr; /* Fidonet nodes */
|
|
||||||
struct _nodes nodes;
|
|
||||||
|
|
||||||
struct _bill bill; /* Unsent bills */
|
|
||||||
|
|
||||||
struct _newfileshdr newfileshdr; /* New file reports */
|
|
||||||
struct _newfiles newfiles;
|
|
||||||
|
|
||||||
struct _scanmgrhdr scanmgrhdr; /* Filefind areas */
|
|
||||||
struct _scanmgr scanmgr;
|
|
||||||
|
|
||||||
struct _routehdr routehdr; /* Routing file */
|
|
||||||
struct _route route;
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Common Library - RFC address functions
|
* Purpose ...............: MBSE BBS Common Library - RFC address functions
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
extern int addrerror;
|
extern int addrerror;
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Date utilities
|
* Purpose ...............: Date utilities
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
static char *wdays[]={(char *)"Sun",(char *)"Mon",(char *)"Tue",(char *)"Wed",
|
static char *wdays[]={(char *)"Sun",(char *)"Mon",(char *)"Tue",(char *)"Wed",
|
||||||
|
@ -29,12 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
/*****************************************************************************
|
/*****************************************************************************
|
||||||
*
|
*
|
||||||
* File ..................: semafore.c
|
* $Id$
|
||||||
* Purpose ...............: Create, test and remove semafore's
|
* Purpose ...............: Create, test and remove semafore's
|
||||||
* Last modification date : 18-Mar-2000
|
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2000
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -30,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
void CreateSema(char *sem)
|
void CreateSema(char *sem)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Signal names
|
* Purpose ...............: Signal names
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,8 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "clcomm.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Internet Library
|
* Purpose ...............: MBSE BBS Internet Library
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,11 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "mbinet.h"
|
#include "mbinet.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
|
|
||||||
#ifndef HAVE_STRCASESTR
|
#ifndef HAVE_STRCASESTR
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Common string functions
|
* Purpose ...............: Common string functions
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2001
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -29,9 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
41
lib/term.c
41
lib/term.c
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Terminal output routines.
|
* Purpose ...............: Terminal output routines.
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -28,15 +28,10 @@
|
|||||||
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define DB_USERS
|
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
#include "users.h"
|
||||||
#include "ansi.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
int termmode; /* 0 = tty, 1 = ANSI */
|
int termmode; /* 0 = tty, 1 = ANSI */
|
||||||
@ -108,31 +103,31 @@ void colour(int fg, int bg)
|
|||||||
}
|
}
|
||||||
|
|
||||||
fprintf(stdout, "[");
|
fprintf(stdout, "[");
|
||||||
if ( fg > 15) {
|
if ( fg > WHITE) {
|
||||||
fprintf(stdout, "5;");
|
fprintf(stdout, "5;");
|
||||||
fg-= 16;
|
fg-= 16;
|
||||||
}
|
}
|
||||||
if (fg > 7) {
|
if (fg > LIGHTGRAY) {
|
||||||
att=1;
|
att=1;
|
||||||
fg=fg-8;
|
fg=fg-8;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fg==0) fore=30;
|
if (fg == BLACK) fore=30;
|
||||||
else if (fg==1) fore=34;
|
else if (fg == BLUE) fore=34;
|
||||||
else if (fg==2) fore=32;
|
else if (fg == GREEN) fore=32;
|
||||||
else if (fg==3) fore=36;
|
else if (fg == CYAN) fore=36;
|
||||||
else if (fg==4) fore=31;
|
else if (fg == RED) fore=31;
|
||||||
else if (fg==5) fore=35;
|
else if (fg == MAGENTA) fore=35;
|
||||||
else if (fg==6) fore=33;
|
else if (fg == BROWN) fore=33;
|
||||||
else fore=37;
|
else fore=37;
|
||||||
|
|
||||||
if (bg==1) back=44;
|
if (bg == BLUE) back=44;
|
||||||
else if (bg==2) back=42;
|
else if (bg == GREEN) back=42;
|
||||||
else if (bg==3) back=46;
|
else if (bg == CYAN) back=46;
|
||||||
else if (bg==4) back=41;
|
else if (bg == RED) back=41;
|
||||||
else if (bg==5) back=45;
|
else if (bg == MAGENTA) back=45;
|
||||||
else if (bg==6) back=43;
|
else if (bg == BROWN) back=43;
|
||||||
else if (bg==7) back=47;
|
else if (bg == LIGHTGRAY) back=47;
|
||||||
else back=40;
|
else back=40;
|
||||||
|
|
||||||
fprintf(stdout, "%d;%d;%dm", att, fore, back);
|
fprintf(stdout, "%d;%d;%dm", att, fore, back);
|
||||||
|
@ -29,10 +29,7 @@
|
|||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: Archive unpacker
|
* Purpose ...............: Archive unpacker
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -28,15 +28,9 @@
|
|||||||
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
* Software Foundation, 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
#define DB_ARCHIVE
|
|
||||||
|
|
||||||
#include "../config.h"
|
#include "../config.h"
|
||||||
#include "libs.h"
|
#include "mbselib.h"
|
||||||
#include "structs.h"
|
|
||||||
#include "users.h"
|
|
||||||
#include "records.h"
|
|
||||||
#include "clcomm.h"
|
|
||||||
#include "common.h"
|
|
||||||
|
|
||||||
|
|
||||||
char *unpacker(char *fn)
|
char *unpacker(char *fn)
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
* Purpose ...............: MBSE BBS Users Database structure
|
* Purpose ...............: MBSE BBS Users Database structure
|
||||||
*
|
*
|
||||||
*****************************************************************************
|
*****************************************************************************
|
||||||
* Copyright (C) 1997-2002
|
* Copyright (C) 1997-2004
|
||||||
*
|
*
|
||||||
* Michiel Broek FIDO: 2:280/2802
|
* Michiel Broek FIDO: 2:280/2802
|
||||||
* Beekmansbos 10
|
* Beekmansbos 10
|
||||||
@ -152,4 +152,9 @@ struct userrec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
struct userhdr usrconfighdr; /* Users database */
|
||||||
|
struct userrec usrconfig;
|
||||||
|
struct userrec exitinfo; /* Users online data */
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user