Added old fastecho back, fixed dot problem in win32, added new keywords
This commit is contained in:
@@ -1244,7 +1244,10 @@ gkey kbxget_raw(int mode) {
|
||||
}
|
||||
// fall through
|
||||
default:
|
||||
{
|
||||
if(ascii == '\x2e') {
|
||||
return (gkey)ascii;
|
||||
}
|
||||
else {
|
||||
int kc = gkbd_nt2bios(inp);
|
||||
if(kc != -1)
|
||||
return (gkey)kc;
|
||||
|
@@ -74,6 +74,7 @@ enum {
|
||||
GRP_MSGLISTHEADER,
|
||||
GRP_MSGLISTWIDESUBJ,
|
||||
GRP_NICKNAME,
|
||||
GRP_NETNAME,
|
||||
GRP_ORGANIZATION,
|
||||
GRP_ORIGIN,
|
||||
GRP_OUTPUTFILE,
|
||||
|
@@ -33,6 +33,8 @@ gxdutch cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxezy102 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxezy110 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfd cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfecho4 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfecho5 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfecho6 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfidpcb cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
gxfm092 cpp all ovl bcd bco bcx wcn wco wcx lnx emx djg rsx cyg
|
||||
|
@@ -255,6 +255,8 @@ protected:
|
||||
void ReadEzycom110(FILE* fp, char* path, char* file, char* options);
|
||||
#endif
|
||||
#ifndef GCFG_NOFE
|
||||
void ReadFastecho11x(int fh);
|
||||
void ReadFastecho141(int fh);
|
||||
void ReadFastecho142(int fh);
|
||||
#endif
|
||||
#ifndef GCFG_NOFMAIL
|
||||
|
476
goldlib/gcfg/gs_fech4.h
Normal file
476
goldlib/gcfg/gs_fech4.h
Normal file
@@ -0,0 +1,476 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The Goldware Library. Copyright (C) Odinn Sorensen.
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free
|
||||
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
// ------------------------------------------------------------------
|
||||
// $Id$
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
||||
#if defined(GOLD_CANPACK)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
|
||||
/********************************************************/
|
||||
/* 'C' Structures of FastEcho 1.30, File: FASTECHO.CFG */
|
||||
/* (c)1993 by Tobias Burchhardt, Updated: 13 Sep 1993 */
|
||||
/********************************************************/
|
||||
|
||||
/********************************************************/
|
||||
/* FASTECHO.CFG = <CONFIG> */
|
||||
/* + <optional extensions> */
|
||||
/* + <CONFIG.NodeCnt * Node> */
|
||||
/* + <CONFIG.AreaCnt * Area> */
|
||||
/********************************************************/
|
||||
|
||||
#define REVISION 4 /* current revision */
|
||||
|
||||
#define MAX_AREAS 960 /* max # of areas */
|
||||
#define MAX_NODES 200 /* max # of nodes */
|
||||
#define MAX_GROUPS 26 /* max # of groups */
|
||||
#define MAX_AKAS 16 /* max # of akas */
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.flags */
|
||||
/********************************************************/
|
||||
#define RETEAR 0x00000001l
|
||||
#define AUTOCREATE 0x00000002l
|
||||
#define KILLEMPTY 0x00000004l
|
||||
#define KILLDUPES 0x00000008l
|
||||
#define FRONTDOOR 0x00000010l
|
||||
#define DBRIDGE 0x00000020l
|
||||
#define BINKLEY 0x00000040l
|
||||
#define INTERMAIL 0x00000080l
|
||||
//#define SWAP_XMS 0x00000100l
|
||||
//#define SWAP_EMS 0x00000200l
|
||||
//#define SWAP_DISK 0x00000400l
|
||||
#define PURGE_PROCESSDATE 0x00008000l
|
||||
#define MAILER_RESCAN 0x00010000l
|
||||
#define EXCLUDE_USERS 0x00020000l
|
||||
#define EXCLUDE_SYSOPS 0x00040000l
|
||||
#define CHECK_DESTINATION 0x00080000l
|
||||
#define UPDATE_BBS_CONFIG 0x00100000l
|
||||
#define KILL_GRUNGED_DATE 0x00200000l
|
||||
#define NOT_BUFFER_EMS 0x00400000l
|
||||
#define KEEP_NETMAILS 0x00800000l
|
||||
#define NOT_UPDATE_MAILER 0x01000000l
|
||||
#define NOT_CHECK_SEMAPHORES 0x02000000l
|
||||
#define CREATE_SEMAPHORES 0x04000000l
|
||||
#define CHECK_COMPLETE 0x08000000l
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.BBSSoftware */
|
||||
/********************************************************/
|
||||
enum BBSSoft { NoBBSSoft = 0, RemoteAccess111, QuickBBS,
|
||||
SuperBBS, ProBoard122, TagBBS, RemoteAccess200,
|
||||
ProBoard130};
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.CC.what */
|
||||
/********************************************************/
|
||||
#define FROM 1
|
||||
#define TO 2
|
||||
#define SUBJECT 3
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.QuietLevel */
|
||||
/********************************************************/
|
||||
#define QUIET_PACK 0x0001
|
||||
#define QUIET_UNPACK 0x0002
|
||||
#define QUIET_EXTERN 0x0004
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.Buffers */
|
||||
/********************************************************/
|
||||
#define BUF_LARGE 0x0000
|
||||
#define BUF_MEDIUM 0x0001
|
||||
#define BUF_SMALL 0x0002
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.arcext.inb/outb */
|
||||
/********************************************************/
|
||||
enum ARCmailExt { ARCDigits = 0, ARCHex, ARCAlpha };
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.AreaFixFlags */
|
||||
/********************************************************/
|
||||
#define ALLOWRESCAN 0x0001
|
||||
#define KEEPREQUEST 0x0002
|
||||
#define KEEPRECEIPT 0x0004
|
||||
#define ALLOWREMOTE 0x0008
|
||||
#define DETAILEDLIST 0x0010
|
||||
#define ALLOWPASSWORD 0x0020
|
||||
#define ALLOWPKTPWD 0x0040
|
||||
|
||||
/********************************************************/
|
||||
/* Area.board (1-200 = QBBS) */
|
||||
/********************************************************/
|
||||
#define NO_BOARD 0x4000u /* everything but QBBS */
|
||||
#define AREA_DELETED 0x8000u /* never written */
|
||||
|
||||
/********************************************************/
|
||||
/* Area.flags.type */
|
||||
/********************************************************/
|
||||
#define QBBS 0
|
||||
#define FIDO 1
|
||||
#define SQUISH 2
|
||||
#define JAM 3
|
||||
#define PT_BOARD 7
|
||||
|
||||
/********************************************************/
|
||||
/* Area.type */
|
||||
/********************************************************/
|
||||
#define AREA_ECHOMAIL 0
|
||||
#define AREA_NETMAIL 1
|
||||
#define AREA_LOCAL 2
|
||||
#define AREA_BADMAILBOARD 3
|
||||
#define AREA_DUPEBOARD 4
|
||||
|
||||
/********************************************************/
|
||||
/* Node.flags */
|
||||
/********************************************************/
|
||||
#define DDDD 0x0001
|
||||
#define TOSSCAN 0x0002
|
||||
#define DIRECT 0x0004
|
||||
#define CRASH 0x0008
|
||||
#define UMLAUT_NET 0x0010
|
||||
#define ALLOW_AF_REMOTE 0x0020
|
||||
#define RESCANDISABLED 0x0040
|
||||
#define HOLD 0x0080
|
||||
#define ARCMAIL060 0x0200
|
||||
#define PASSIVE 0x0400
|
||||
#define ALLOWAREACREATE 0x0800
|
||||
#define PACKER 0xF000
|
||||
|
||||
#define PACKS(x) (int)(((x)&PACKER)>>12) /* Index of used Packer */
|
||||
/* 0xf = .PKT, don't pack */
|
||||
|
||||
/********************************************************/
|
||||
/* Node.advflags */
|
||||
/********************************************************/
|
||||
#define EXPORTBYNAME 0x0001
|
||||
#define NOT_NOTIFY 0x0002
|
||||
#define NOT_HELP 0x0004
|
||||
#define NOATTACH 0x0008
|
||||
#define NET_HOLD 0x0010
|
||||
#define NET_CRASH 0x0020
|
||||
#define NET_DIRECT 0x0040
|
||||
|
||||
/********************************************************/
|
||||
/* Types */
|
||||
/********************************************************/
|
||||
#if 1
|
||||
typedef unsigned char bit;
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word; /* normal int = 16 bit */
|
||||
typedef unsigned long dword;
|
||||
#endif
|
||||
|
||||
enum ARCers { ARC_Unknown = -1, ARC_SeaArc, ARC_PkArc, ARC_Pak,
|
||||
ARC_ArcPlus, ARC_Zoo, ARC_PkZip, ARC_Lha, ARC_Arj,
|
||||
ARC_Sqz }; /* CONFIG.Unpackers[] */
|
||||
|
||||
/********************************************************/
|
||||
/* Structures */
|
||||
/********************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word zone,net,node,point;
|
||||
} Address;
|
||||
|
||||
#define _MAXPATH 56
|
||||
|
||||
typedef struct CONFIGURATION4
|
||||
{
|
||||
word revision;
|
||||
dword flags;
|
||||
word NodeCnt,AreaCnt,unused1;
|
||||
char NetMPath[_MAXPATH],
|
||||
MsgBase[_MAXPATH],
|
||||
InBound[_MAXPATH],
|
||||
OutBound[_MAXPATH],
|
||||
Unpacker[_MAXPATH],
|
||||
LogFile[_MAXPATH],
|
||||
OriginLine[8][_MAXPATH],
|
||||
StatFile[_MAXPATH],
|
||||
SwapPath[_MAXPATH],
|
||||
SemaphorePath[_MAXPATH],
|
||||
BBSConfigPath[_MAXPATH],
|
||||
DBQueuePath[_MAXPATH],
|
||||
unused2[32],
|
||||
RetearTo[40],
|
||||
SecurePath[_MAXPATH],
|
||||
ExtAfter[_MAXPATH-4],
|
||||
ExtBefore[_MAXPATH-4];
|
||||
struct
|
||||
{
|
||||
char tag[4];
|
||||
char name[_MAXPATH-2];
|
||||
char list[2]; /* List prefix character */
|
||||
} Packer[8];
|
||||
struct
|
||||
{
|
||||
byte what;
|
||||
char object[31];
|
||||
word conference;
|
||||
} CC[10];
|
||||
byte security,loglevel;
|
||||
short def_days,def_messages;
|
||||
struct /* now obsolete */
|
||||
{
|
||||
Address main;
|
||||
char domain[28];
|
||||
word pointnet;
|
||||
dword flags;
|
||||
} oldakas[11]; /* but still maintained */
|
||||
word autorenum;
|
||||
short def_recvdays;
|
||||
word openQQQs;
|
||||
word oldduperecords; /* now obsolete */
|
||||
word msglen;
|
||||
word unused3;
|
||||
char TempPath[_MAXPATH];
|
||||
byte graphics,BBSSoftware;
|
||||
char AreaFixHelp[_MAXPATH];
|
||||
char Unpackers[9][_MAXPATH];
|
||||
word AreaFixFlags;
|
||||
byte QuietLevel,Buffers;
|
||||
byte FWACnt,GDCnt; /* # of ForwardAreaFix records,
|
||||
# of Group Default records */
|
||||
struct
|
||||
{
|
||||
word flags;
|
||||
word days[2];
|
||||
word msgs[2];
|
||||
} rescan_def;
|
||||
dword duperecords;
|
||||
struct
|
||||
{
|
||||
byte inb;
|
||||
byte outb;
|
||||
} arcext;
|
||||
word AFixRcptLen;
|
||||
word AkaCnt;
|
||||
word maxPKT;
|
||||
byte sharing,sorting;
|
||||
struct
|
||||
{
|
||||
char name[36];
|
||||
dword resv;
|
||||
} sysops[11];
|
||||
char AreaFixLog[_MAXPATH];
|
||||
char TempInBound[_MAXPATH];
|
||||
char resv2[832];
|
||||
dword offset; /* This is the offset from the current
|
||||
file-pointer to the 1st Node */
|
||||
} CONFIG4;
|
||||
|
||||
/* To directly access the 'Nodes' and/or 'Areas' while bypassing the */
|
||||
/* Extensions, perform an absolute (from beginning of file) seek to */
|
||||
/* sizeof(CONFIG) + CONFIG.offset */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Address addr;
|
||||
byte aka; /* 0 ... MAX_AKAS-1 */
|
||||
byte autopassive; /* # of days */
|
||||
word flags;
|
||||
word sec_level;
|
||||
char password[9]; /* .PKT password */
|
||||
char newgroup; /* Default group for new areas */
|
||||
Address routes[15]; /* netmail routing */
|
||||
byte areas[124]; /* Bit-field with 992 bits, Byte 0/Bit 7 */
|
||||
/* is conference 0, etc. */
|
||||
dword groups; /* Bit-field, Byte 0/Bit 7 = 'A' etc. */
|
||||
/* false means group is active */
|
||||
char areafixpw[9];
|
||||
byte advflags;
|
||||
} FeNode4;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[41];
|
||||
byte type;
|
||||
word board;
|
||||
short messages;
|
||||
struct
|
||||
{
|
||||
bit origin : 3;
|
||||
bit group : 5; /* 0 ... MAX_GROUPS-1 */
|
||||
bit type : 3;
|
||||
bit umlaut : 1;
|
||||
bit aka : 4; /* 0 ... MAX_AKAS-1 */
|
||||
} flags;
|
||||
short days;
|
||||
word conference; /* 0 ... 991 */
|
||||
word read_sec,write_sec;
|
||||
struct
|
||||
{
|
||||
bit autoadded : 1;
|
||||
bit tinyseen : 1;
|
||||
bit cpd : 1;
|
||||
bit passive : 1;
|
||||
bit keepseen : 1;
|
||||
bit mandatory : 1;
|
||||
bit keepsysop : 1;
|
||||
bit killread : 1;
|
||||
bit disablepsv : 1;
|
||||
bit resv : 7;
|
||||
} advflags;
|
||||
char path[_MAXPATH];
|
||||
char desc[42];
|
||||
word seenbys; /* LSB = Aka0, MSB = Aka15 */
|
||||
short recvdays;
|
||||
} FeArea4;
|
||||
|
||||
|
||||
/********************************************************/
|
||||
/* Optional Extensions */
|
||||
/********************************************************/
|
||||
/* These are the variable length extensions between */
|
||||
/* CONFIG and the first Node record. Each extension has */
|
||||
/* a header which contains the info about the type and */
|
||||
/* the length of the extension. You can read the fields */
|
||||
/* using the following algorithm: */
|
||||
/* */
|
||||
/* offset := 0; */
|
||||
/* while (offset<CONFIG.offset) do */
|
||||
/* read_header; */
|
||||
/* if(header.type==EH_abc) then */
|
||||
/* read_and_process_data; */
|
||||
/* else */
|
||||
/* if(header.type==EH_xyz) then */
|
||||
/* read_and_process_data; */
|
||||
/* else */
|
||||
/* [...] */
|
||||
/* else // unknown or unwanted extension found */
|
||||
/* seek_forward(header.offset); // Seek to next header */
|
||||
/* offset = offset + header.offset; */
|
||||
/* end; */
|
||||
/********************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word type; /* EH_... */
|
||||
dword offset; /* length of field excluding header */
|
||||
} ExtensionHeader;
|
||||
|
||||
|
||||
#define EH_AREAFIX 0x0001 /* CONFIG.FWACnt * <ForwardAreaFix> */
|
||||
|
||||
enum AreaFixSendTo { AreaFix = 0, AreaMgr, AreaLink, EchoMgr };
|
||||
enum AreaFixAreaListFormat { Areas_BBS = 0, Area_List };
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word nodenr;
|
||||
struct
|
||||
{
|
||||
bit sendto : 3;
|
||||
bit newgroup: 5;
|
||||
bit valid : 1;
|
||||
bit uncond : 1;
|
||||
bit addplus : 1;
|
||||
bit addtear : 1;
|
||||
bit format : 3;
|
||||
bit active : 1;
|
||||
} flags;
|
||||
char file[_MAXPATH];
|
||||
dword groups;
|
||||
word sec_level;
|
||||
char resv[6];
|
||||
} ForwardAreaFix;
|
||||
|
||||
#define EH_GROUPS 0x0002 /* 1 record of <GroupNames> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[26][35];
|
||||
} GroupNames;
|
||||
|
||||
#define EH_SYSOPNAMES 0x0003 /* CONFIG.NodeCnt * <SysopNames> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[36];
|
||||
} SysopNames;
|
||||
|
||||
#define EH_GRPDEFAULTS 0x0006 /* CONFIG.GDCnt * <GroupDefaults> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
byte group;
|
||||
FeArea4 area;
|
||||
byte nodes[32]; /* 256 bits */
|
||||
} GroupDefaults;
|
||||
|
||||
#define EH_AKAS 0x0007 /* CONFIG.AkaCnt * <SysAddress> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Address main;
|
||||
char domain[28];
|
||||
word pointnet;
|
||||
dword flags; /* unused */
|
||||
} SysAddress;
|
||||
|
||||
#define EH_RA111_MSG 0x0100 /* Original records of BBS systems */
|
||||
#define EH_QBBS_MSG 0x0101
|
||||
#define EH_SBBS_MSG 0x0102
|
||||
#define EH_PB122_MSG 0x0103
|
||||
#define EH_TAG_MSG 0x0104
|
||||
#define EH_RA200_MSG 0x0105 /* See BBS package's documentation */
|
||||
#define EH_PB130_MSG 0x0106 /* for details */
|
||||
|
||||
/********************************************************/
|
||||
/* Routines to access Node.areas, Node.groups */
|
||||
/********************************************************/
|
||||
|
||||
#if 0
|
||||
|
||||
word AddBam(byte *bam,word nr)
|
||||
{
|
||||
byte c=(1<<(7-(nr&7))),d;
|
||||
|
||||
d=bam[nr/8]&c;
|
||||
bam[nr/8]|=c;
|
||||
return(d);
|
||||
}
|
||||
|
||||
void FreeBam(byte *bam,word nr)
|
||||
{
|
||||
bam[nr/8]&=~(1<<(7-(nr&7)));
|
||||
}
|
||||
|
||||
word GetBam(byte *bam,word nr)
|
||||
{
|
||||
if(bam[nr/8]&(1<<(7-(nr&7)))) return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
#define IsActive(nr,area) GetBam(Node[nr].areas,area)
|
||||
#define SetActive(nr,area) AddBam(Node[nr].areas,area)
|
||||
#define SetDeActive(nr,area) FreeBam(Node[nr].areas,area)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(GOLD_CANPACK)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
502
goldlib/gcfg/gs_fech5.h
Normal file
502
goldlib/gcfg/gs_fech5.h
Normal file
@@ -0,0 +1,502 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The Goldware Library. Copyright (C) Odinn Sorensen.
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free
|
||||
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
// ------------------------------------------------------------------
|
||||
// $Id$
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
|
||||
/********************************************************/
|
||||
/* 'C' Structures of FastEcho 1.41, File: FASTECHO.CFG */
|
||||
/* (c)1994 by Tobias Burchhardt, Updated: 11 Apr 1994 */
|
||||
/********************************************************/
|
||||
|
||||
/********************************************************/
|
||||
/* FASTECHO.CFG = <CONFIG> */
|
||||
/* + <optional extensions> */
|
||||
/* + <CONFIG.NodeCnt * Node> */
|
||||
/* + <CONFIG.AreaCnt * Area> */
|
||||
/********************************************************/
|
||||
|
||||
|
||||
#if defined(GOLD_CANPACK)
|
||||
#pragma pack(1)
|
||||
#endif
|
||||
|
||||
|
||||
#define REVISION 5 /* current revision */
|
||||
|
||||
#define MAX_AREAS 2048 /* max # of areas */
|
||||
#define MAX_NODES 1024 /* max # of nodes */
|
||||
#define MAX_GROUPS 26 /* max # of groups */
|
||||
#define MAX_AKAS 16 /* max # of akas */
|
||||
#define MAX_ROUTE 15 /* max # of 'vias' */
|
||||
|
||||
/*
|
||||
Note: The MAX_AREAS and MAX_NODES are only the absolute maximums
|
||||
as the handling is flexible. To get the maximums which are
|
||||
used for the config file you read, you have to examine the
|
||||
CONFIG.MaxAreas and CONFIG.MaxNodes variables !
|
||||
*/
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.flags */
|
||||
/********************************************************/
|
||||
#define RETEAR 0x00000001l
|
||||
#define AUTOCREATE 0x00000002l
|
||||
#define KILLEMPTY 0x00000004l
|
||||
#define KILLDUPES 0x00000008l
|
||||
#define FRONTDOOR 0x00000010l
|
||||
#define DBRIDGE 0x00000020l
|
||||
#define BINKLEY 0x00000040l
|
||||
#define INTERMAIL 0x00000080l
|
||||
//#define SWAP_XMS 0x00000100l
|
||||
//#define SWAP_EMS 0x00000200l
|
||||
//#define SWAP_DISK 0x00000400l
|
||||
#define PURGE_PROCESSDATE 0x00008000l
|
||||
#define MAILER_RESCAN 0x00010000l
|
||||
#define EXCLUDE_USERS 0x00020000l
|
||||
#define EXCLUDE_SYSOPS 0x00040000l
|
||||
#define CHECK_DESTINATION 0x00080000l
|
||||
#define UPDATE_BBS_CONFIG 0x00100000l
|
||||
#define KILL_GRUNGED_DATE 0x00200000l
|
||||
#define NOT_BUFFER_EMS 0x00400000l
|
||||
#define KEEP_NETMAILS 0x00800000l
|
||||
#define NOT_UPDATE_MAILER 0x01000000l
|
||||
#define NOT_CHECK_SEMAPHORES 0x02000000l
|
||||
#define CREATE_SEMAPHORES 0x04000000l
|
||||
#define CHECK_COMPLETE 0x08000000l
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.BBSSoftware */
|
||||
/********************************************************/
|
||||
enum BBSSoft { NoBBSSoft = 0, RemoteAccess111, QuickBBS,
|
||||
SuperBBS, ProBoard122, TagBBS, RemoteAccess200,
|
||||
ProBoard130};
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.CC.what */
|
||||
/********************************************************/
|
||||
#define FROM 1
|
||||
#define TO 2
|
||||
#define SUBJECT 3
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.QuietLevel */
|
||||
/********************************************************/
|
||||
#define QUIET_PACK 0x0001
|
||||
#define QUIET_UNPACK 0x0002
|
||||
#define QUIET_EXTERN 0x0004
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.Buffers */
|
||||
/********************************************************/
|
||||
#define BUF_LARGE 0x0000
|
||||
#define BUF_MEDIUM 0x0001
|
||||
#define BUF_SMALL 0x0002
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.arcext.inb/outb */
|
||||
/********************************************************/
|
||||
enum ARCmailExt { ARCDigits = 0, ARCHex, ARCAlpha };
|
||||
|
||||
/********************************************************/
|
||||
/* CONFIG.AreaFixFlags */
|
||||
/********************************************************/
|
||||
#define ALLOWRESCAN 0x0001
|
||||
#define KEEPREQUEST 0x0002
|
||||
#define KEEPRECEIPT 0x0004
|
||||
#define ALLOWREMOTE 0x0008
|
||||
#define DETAILEDLIST 0x0010
|
||||
#define ALLOWPASSWORD 0x0020
|
||||
#define ALLOWPKTPWD 0x0040
|
||||
|
||||
/********************************************************/
|
||||
/* Area.board (1-200 = QBBS) */
|
||||
/********************************************************/
|
||||
#define NO_BOARD 0x4000u /* everything but QBBS */
|
||||
#define AREA_DELETED 0x8000u /* never written */
|
||||
|
||||
/********************************************************/
|
||||
/* Area.flags.type */
|
||||
/********************************************************/
|
||||
#define QBBS 0
|
||||
#define FIDO 1
|
||||
#define SQUISH 2
|
||||
#define JAM 3
|
||||
#define PT_BOARD 7
|
||||
|
||||
/********************************************************/
|
||||
/* Area.type */
|
||||
/********************************************************/
|
||||
#define AREA_ECHOMAIL 0
|
||||
#define AREA_NETMAIL 1
|
||||
#define AREA_LOCAL 2
|
||||
#define AREA_BADMAILBOARD 3
|
||||
#define AREA_DUPEBOARD 4
|
||||
|
||||
/********************************************************/
|
||||
/* Node.flags */
|
||||
/********************************************************/
|
||||
#define DDDD 0x0001
|
||||
#define TOSSCAN 0x0002
|
||||
#define DIRECT 0x0004
|
||||
#define CRASH 0x0008
|
||||
#define UMLAUT_NET 0x0010
|
||||
#define ALLOW_AF_REMOTE 0x0020
|
||||
#define RESCANDISABLED 0x0040
|
||||
#define HOLD 0x0080
|
||||
#define ARCMAIL060 0x0200
|
||||
#define PASSIVE 0x0400
|
||||
#define ALLOWAREACREATE 0x0800
|
||||
#define PACKER 0xF000
|
||||
|
||||
#define PACKS(x) (int)(((x)&PACKER)>>12) /* Index of used Packer */
|
||||
/* 0xf = .PKT, don't pack */
|
||||
|
||||
/********************************************************/
|
||||
/* Node.advflags */
|
||||
/********************************************************/
|
||||
#define EXPORTBYNAME 0x0001
|
||||
#define NOT_NOTIFY 0x0002
|
||||
#define NOT_HELP 0x0004
|
||||
#define NOATTACH 0x0008
|
||||
#define NET_HOLD 0x0010
|
||||
#define NET_CRASH 0x0020
|
||||
#define NET_DIRECT 0x0040
|
||||
|
||||
/********************************************************/
|
||||
/* Types */
|
||||
/********************************************************/
|
||||
#if 1
|
||||
typedef unsigned char byte;
|
||||
typedef unsigned short word; /* normal int = 16 bit */
|
||||
typedef unsigned long dword;
|
||||
#endif
|
||||
|
||||
enum ARCers { ARC_Unknown = -1, ARC_SeaArc, ARC_PkArc, ARC_Pak,
|
||||
ARC_ArcPlus, ARC_Zoo, ARC_PkZip, ARC_Lha, ARC_Arj,
|
||||
ARC_Sqz }; /* CONFIG.Unpackers[] */
|
||||
|
||||
/********************************************************/
|
||||
/* Structures */
|
||||
/********************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word zone,net,node,point;
|
||||
} Address;
|
||||
|
||||
#define _MAXPATH 56
|
||||
|
||||
typedef struct CONFIGURATION5
|
||||
{
|
||||
word revision;
|
||||
dword flags;
|
||||
word NodeCnt,AreaCnt,unused1;
|
||||
char NetMPath[_MAXPATH],
|
||||
MsgBase[_MAXPATH],
|
||||
InBound[_MAXPATH],
|
||||
OutBound[_MAXPATH],
|
||||
Unpacker[_MAXPATH],
|
||||
LogFile[_MAXPATH],
|
||||
OriginLine[8][_MAXPATH],
|
||||
StatFile[_MAXPATH],
|
||||
SwapPath[_MAXPATH],
|
||||
SemaphorePath[_MAXPATH],
|
||||
BBSConfigPath[_MAXPATH],
|
||||
DBQueuePath[_MAXPATH],
|
||||
unused2[32],
|
||||
RetearTo[40],
|
||||
SecurePath[_MAXPATH],
|
||||
ExtAfter[_MAXPATH-4],
|
||||
ExtBefore[_MAXPATH-4];
|
||||
struct
|
||||
{
|
||||
char tag[4];
|
||||
char name[_MAXPATH-2];
|
||||
char list[2]; /* List prefix character */
|
||||
} Packer[8];
|
||||
struct
|
||||
{
|
||||
byte what;
|
||||
char object[31];
|
||||
word conference;
|
||||
} CC[10];
|
||||
byte security,loglevel;
|
||||
short def_days,def_messages;
|
||||
struct /* now obsolete */
|
||||
{
|
||||
Address main;
|
||||
char domain[28];
|
||||
word pointnet;
|
||||
dword flags;
|
||||
} oldakas[11]; /* but still maintained */
|
||||
word autorenum;
|
||||
short def_recvdays;
|
||||
word openQQQs;
|
||||
word compressafter;
|
||||
word msglen;
|
||||
word compressfree;
|
||||
char TempPath[_MAXPATH];
|
||||
byte graphics,BBSSoftware;
|
||||
char AreaFixHelp[_MAXPATH];
|
||||
char Unpackers[9][_MAXPATH];
|
||||
word AreaFixFlags;
|
||||
byte QuietLevel,Buffers;
|
||||
byte FWACnt,GDCnt; /* # of ForwardAreaFix records,
|
||||
# of Group Default records */
|
||||
struct
|
||||
{
|
||||
word flags;
|
||||
word days[2];
|
||||
word msgs[2];
|
||||
} rescan_def;
|
||||
dword duperecords;
|
||||
struct
|
||||
{
|
||||
byte inb;
|
||||
byte outb;
|
||||
} arcext;
|
||||
word AFixRcptLen;
|
||||
word AkaCnt;
|
||||
word maxPKT;
|
||||
byte sharing,sorting;
|
||||
struct
|
||||
{
|
||||
char name[36];
|
||||
dword resv;
|
||||
} sysops[11];
|
||||
char AreaFixLog[_MAXPATH];
|
||||
char TempInBound[_MAXPATH];
|
||||
word maxPKTmsgs;
|
||||
word RouteCnt; /* # of PackRoute records */
|
||||
char resv2[822];
|
||||
word MaxAreas,MaxNodes; /* Current max values for this config */
|
||||
word NodeRecSize; /* For internal use only, the 'Node'
|
||||
record will always be written
|
||||
completely while only the currently
|
||||
used size will be held in memory
|
||||
while FE & FESetup is running */
|
||||
dword offset; /* This is the offset from the current
|
||||
file-pointer to the 1st Node */
|
||||
} CONFIG5;
|
||||
|
||||
/* To directly access the 'Nodes' and/or 'Areas' while bypassing the */
|
||||
/* Extensions, perform an absolute (from beginning of file) seek to */
|
||||
/* sizeof(CONFIG) + CONFIG.offset */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Address addr;
|
||||
Address arcdest; /* destination for ARCmail file attaches */
|
||||
byte aka; /* 0 ... MAX_AKAS-1 */
|
||||
byte autopassive; /* # of days */
|
||||
byte newgroup; /* Default group for new areas */
|
||||
byte advflags;
|
||||
word flags;
|
||||
word sec_level;
|
||||
char password[9]; /* .PKT password */
|
||||
char areafixpw[9]; /* AreaFix password */
|
||||
dword groups; /* Bit-field, Byte 0/Bit 7 = 'A' etc. */
|
||||
/* false means group is active */
|
||||
dword resv;
|
||||
byte areas[MAX_AREAS/8]; /* Bit-field with MAX_AREAS bits, Byte 0/Bit 7 */
|
||||
/* is conference 0, etc. */
|
||||
} FeNode5;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[41];
|
||||
byte type;
|
||||
word board;
|
||||
short messages;
|
||||
struct
|
||||
{
|
||||
word origin : 3;
|
||||
word group : 5; /* 0 ... MAX_GROUPS-1 */
|
||||
word type : 3;
|
||||
word umlaut : 1;
|
||||
word aka : 4; /* 0 ... MAX_AKAS-1 */
|
||||
} flags;
|
||||
short days;
|
||||
word conference; /* 0 ... MAX_AREAS-1 */
|
||||
word read_sec,write_sec;
|
||||
struct
|
||||
{
|
||||
word autoadded : 1;
|
||||
word tinyseen : 1;
|
||||
word cpd : 1;
|
||||
word passive : 1;
|
||||
word keepseen : 1;
|
||||
word mandatory : 1;
|
||||
word keepsysop : 1;
|
||||
word killread : 1;
|
||||
word disablepsv : 1;
|
||||
word resv : 7;
|
||||
} advflags;
|
||||
word seenbys; /* LSB = Aka0, MSB = Aka15 */
|
||||
short recvdays;
|
||||
dword resv1;
|
||||
char path[_MAXPATH];
|
||||
char desc[42];
|
||||
} FeArea5;
|
||||
|
||||
|
||||
/********************************************************/
|
||||
/* Optional Extensions */
|
||||
/********************************************************/
|
||||
/* These are the variable length extensions between */
|
||||
/* CONFIG and the first Node record. Each extension has */
|
||||
/* a header which contains the info about the type and */
|
||||
/* the length of the extension. You can read the fields */
|
||||
/* using the following algorithm: */
|
||||
/* */
|
||||
/* offset := 0; */
|
||||
/* while (offset<CONFIG.offset) do */
|
||||
/* read_header; */
|
||||
/* if(header.type==EH_abc) then */
|
||||
/* read_and_process_data; */
|
||||
/* else */
|
||||
/* if(header.type==EH_xyz) then */
|
||||
/* read_and_process_data; */
|
||||
/* else */
|
||||
/* [...] */
|
||||
/* else // unknown or unwanted extension found */
|
||||
/* seek_forward(header.offset); // Seek to next header */
|
||||
/* offset = offset + header.offset; */
|
||||
/* end; */
|
||||
/********************************************************/
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word type; /* EH_... */
|
||||
dword offset; /* length of field excluding header */
|
||||
} ExtensionHeader;
|
||||
|
||||
|
||||
#define EH_AREAFIX 0x0001 /* CONFIG.FWACnt * <ForwardAreaFix> */
|
||||
|
||||
enum AreaFixSendTo { AreaFix = 0, AreaMgr, AreaLink, EchoMgr };
|
||||
enum AreaFixAreaListFormat { Areas_BBS = 0, Area_List };
|
||||
|
||||
typedef struct
|
||||
{
|
||||
word nodenr;
|
||||
struct
|
||||
{
|
||||
word sendto : 3;
|
||||
word newgroup: 5;
|
||||
word valid : 1;
|
||||
word uncond : 1;
|
||||
word addplus : 1;
|
||||
word addtear : 1;
|
||||
word format : 3;
|
||||
word active : 1;
|
||||
} flags;
|
||||
char file[_MAXPATH];
|
||||
dword groups;
|
||||
word sec_level;
|
||||
char resv[6];
|
||||
} ForwardAreaFix;
|
||||
|
||||
#define EH_GROUPS 0x0002 /* 1 record of <GroupNames> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[MAX_GROUPS][35];
|
||||
} GroupNames;
|
||||
|
||||
#define EH_SYSOPNAMES 0x0003 /* CONFIG.NodeCnt * <SysopNames> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char name[36];
|
||||
} SysopNames;
|
||||
|
||||
#define EH_GRPDEFAULTS 0x0006 /* CONFIG.GDCnt * <GroupDefaults> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
byte group;
|
||||
FeArea5 area;
|
||||
byte nodes[MAX_NODES/8]; /* MAX_NODES bits */
|
||||
} GroupDefaults;
|
||||
|
||||
#define EH_AKAS 0x0007 /* CONFIG.AkaCnt * <SysAddress> */
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Address main;
|
||||
char domain[28];
|
||||
word pointnet;
|
||||
dword flags; /* unused */
|
||||
} SysAddress;
|
||||
|
||||
#define EH_PACKROUTE 0x0009
|
||||
|
||||
typedef struct
|
||||
{
|
||||
Address dest;
|
||||
Address routes[MAX_ROUTE];
|
||||
} PackRoute;
|
||||
|
||||
#define EH_RA111_MSG 0x0100 /* Original records of BBS systems */
|
||||
#define EH_QBBS_MSG 0x0101
|
||||
#define EH_SBBS_MSG 0x0102
|
||||
#define EH_PB122_MSG 0x0103 /* obsolete */
|
||||
#define EH_TAG_MSG 0x0104
|
||||
#define EH_RA200_MSG 0x0105 /* See BBS package's documentation */
|
||||
#define EH_PB200_MSG 0x0106 /* for details */
|
||||
|
||||
/********************************************************/
|
||||
/* Routines to access Node.areas, Node.groups */
|
||||
/********************************************************/
|
||||
|
||||
#if 0
|
||||
|
||||
word AddBam(byte *bam,word nr)
|
||||
{
|
||||
byte c=(1<<(7-(nr&7))),d;
|
||||
|
||||
d=bam[nr/8]&c;
|
||||
bam[nr/8]|=c;
|
||||
return(d);
|
||||
}
|
||||
|
||||
void FreeBam(byte *bam,word nr)
|
||||
{
|
||||
bam[nr/8]&=~(1<<(7-(nr&7)));
|
||||
}
|
||||
|
||||
word GetBam(byte *bam,word nr)
|
||||
{
|
||||
if(bam[nr/8]&(1<<(7-(nr&7)))) return(true);
|
||||
return(false);
|
||||
}
|
||||
|
||||
#define IsActive(nr,area) GetBam(Node[nr].areas,area)
|
||||
#define SetActive(nr,area) AddBam(Node[nr].areas,area)
|
||||
#define SetDeActive(nr,area) FreeBam(Node[nr].areas,area)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#if defined(GOLD_CANPACK)
|
||||
#pragma pack()
|
||||
#endif
|
||||
|
159
goldlib/gcfg/gxfecho4.cpp
Normal file
159
goldlib/gcfg/gxfecho4.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The Goldware Library. Copyright (C) Odinn Sorensen.
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free
|
||||
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
// ------------------------------------------------------------------
|
||||
// $Id$
|
||||
// ------------------------------------------------------------------
|
||||
// Read areas from FastEcho >= 1.10 (config revision level 4)
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <gfilutil.h>
|
||||
#include <gmemdbg.h>
|
||||
#undef GCFG_NOFE
|
||||
#include <gedacfg.h>
|
||||
#include <gs_fech4.h>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Read FASTECHO.CFG
|
||||
|
||||
void gareafile::ReadFastecho11x(int fh) {
|
||||
|
||||
AreaCfg aa;
|
||||
|
||||
CONFIG4* cfg = (CONFIG4*)throw_calloc(1, sizeof(CONFIG4));
|
||||
FeArea4* area = (FeArea4*)throw_calloc(1, sizeof(FeArea4));
|
||||
|
||||
// Read main config record
|
||||
read(fh, cfg, sizeof(CONFIG4));
|
||||
|
||||
// Get usernames
|
||||
//for(int u=0; u<11; u++)
|
||||
//CfgUsername(cfg->sysops[u].name);
|
||||
|
||||
// Get Hudson msgbase path
|
||||
if(*hudsonpath == NUL)
|
||||
PathCopy(hudsonpath, MapPath(cfg->MsgBase));
|
||||
|
||||
// Setup aka list
|
||||
SysAddress* aka = (SysAddress*)throw_calloc(cfg->AkaCnt, sizeof(SysAddress));
|
||||
for(int c=0; c<11; c++)
|
||||
aka[c].main = cfg->oldakas[c].main;
|
||||
|
||||
// Process extended headers
|
||||
ulong offset = 0;
|
||||
while(offset < cfg->offset) {
|
||||
ExtensionHeader ehdr;
|
||||
read(fh, &ehdr, sizeof(ExtensionHeader));
|
||||
offset += sizeof(ExtensionHeader);
|
||||
switch(ehdr.type) {
|
||||
case EH_AKAS:
|
||||
read(fh, aka, cfg->AkaCnt*sizeof(SysAddress));
|
||||
break;
|
||||
default:
|
||||
lseek(fh, ehdr.offset, SEEK_CUR);
|
||||
}
|
||||
offset += ehdr.offset;
|
||||
}
|
||||
|
||||
// Skip node records
|
||||
lseek(fh, (long)(cfg->NodeCnt)*(long)sizeof(FeNode4), SEEK_CUR);
|
||||
|
||||
// The *.MSG netmail area
|
||||
aa.reset();
|
||||
aa.aka = CAST(ftn_addr, aka[0].main);
|
||||
aa.type = GMB_NET;
|
||||
aa.attr = attribsnet;
|
||||
aa.msgbase = fidomsgtype;
|
||||
aa.setpath(cfg->NetMPath);
|
||||
aa.setdesc("FastEcho Netmail");
|
||||
aa.setautoid("NETMAIL");
|
||||
AddNewArea(aa);
|
||||
|
||||
// All the echomail areas
|
||||
for(int n=0; n<cfg->AreaCnt; n++) {
|
||||
read(fh, area, sizeof(FeArea4));
|
||||
if(area->board != AREA_DELETED) {
|
||||
aa.reset();
|
||||
aa.aka = CAST(ftn_addr, aka[area->flags.aka].main);
|
||||
switch(area->flags.type) {
|
||||
case QBBS:
|
||||
aa.msgbase = GMB_HUDSON;
|
||||
aa.board = area->board;
|
||||
break;
|
||||
case FIDO:
|
||||
aa.msgbase = fidomsgtype;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case SQUISH:
|
||||
aa.msgbase = GMB_SQUISH;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case JAM:
|
||||
aa.msgbase = GMB_JAM;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case PT_BOARD:
|
||||
default:
|
||||
// Passthrough or unknown
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(area->type) {
|
||||
case AREA_ECHOMAIL:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
case AREA_NETMAIL:
|
||||
aa.type = GMB_NET;
|
||||
aa.attr = attribsnet;
|
||||
break;
|
||||
case AREA_LOCAL:
|
||||
aa.type = GMB_LOCAL;
|
||||
aa.attr = attribslocal;
|
||||
break;
|
||||
case AREA_BADMAILBOARD:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
case AREA_DUPEBOARD:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
default:
|
||||
// Unknown type
|
||||
continue;
|
||||
|
||||
}
|
||||
aa.setdesc(area->desc);
|
||||
aa.setechoid(area->name);
|
||||
aa.setorigin(cfg->OriginLine[area->flags.origin]);
|
||||
aa.groupid = (char)('A' + area->flags.group);
|
||||
AddNewArea(aa);
|
||||
}
|
||||
}
|
||||
|
||||
throw_free(aka);
|
||||
throw_free(area);
|
||||
throw_free(cfg);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
159
goldlib/gcfg/gxfecho5.cpp
Normal file
159
goldlib/gcfg/gxfecho5.cpp
Normal file
@@ -0,0 +1,159 @@
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// The Goldware Library. Copyright (C) Odinn Sorensen.
|
||||
// ------------------------------------------------------------------
|
||||
// This library is free software; you can redistribute it and/or
|
||||
// modify it under the terms of the GNU Library General Public
|
||||
// License as published by the Free Software Foundation; either
|
||||
// version 2 of the License, or (at your option) any later version.
|
||||
//
|
||||
// This library 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
|
||||
// Library General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Library General Public
|
||||
// License along with this library; if not, write to the Free
|
||||
// Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
// ------------------------------------------------------------------
|
||||
// $Id$
|
||||
// ------------------------------------------------------------------
|
||||
// Read areas from FastEcho 1.41 (config revision level 5)
|
||||
// ------------------------------------------------------------------
|
||||
|
||||
#include <cstring>
|
||||
#include <cstdlib>
|
||||
#include <gfilutil.h>
|
||||
#include <gmemdbg.h>
|
||||
#undef GCFG_NOFE
|
||||
#include <gedacfg.h>
|
||||
#include <gs_fech5.h>
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
// Read FASTECHO.CFG
|
||||
|
||||
void gareafile::ReadFastecho141(int fh) {
|
||||
|
||||
AreaCfg aa;
|
||||
|
||||
CONFIG5* cfg = (CONFIG5*)throw_calloc(1, sizeof(CONFIG5));
|
||||
FeArea5* area = (FeArea5*)throw_calloc(1, sizeof(FeArea5));
|
||||
|
||||
// Read main config record
|
||||
read(fh, cfg, sizeof(CONFIG5));
|
||||
|
||||
// Get usernames
|
||||
//for(int u=0; u<11; u++)
|
||||
//CfgUsername(cfg->sysops[u].name);
|
||||
|
||||
// Get Hudson msgbase path
|
||||
if(*hudsonpath == NUL)
|
||||
PathCopy(hudsonpath, MapPath(cfg->MsgBase));
|
||||
|
||||
// Setup aka list
|
||||
SysAddress* aka = (SysAddress*)throw_calloc(cfg->AkaCnt, sizeof(SysAddress));
|
||||
for(int c=0; c<11; c++)
|
||||
aka[c].main = cfg->oldakas[c].main;
|
||||
|
||||
// Process extended headers
|
||||
ulong offset = 0;
|
||||
while(offset < cfg->offset) {
|
||||
ExtensionHeader ehdr;
|
||||
read(fh, &ehdr, sizeof(ExtensionHeader));
|
||||
offset += sizeof(ExtensionHeader);
|
||||
switch(ehdr.type) {
|
||||
case EH_AKAS:
|
||||
read(fh, aka, cfg->AkaCnt*sizeof(SysAddress));
|
||||
break;
|
||||
default:
|
||||
lseek(fh, ehdr.offset, SEEK_CUR);
|
||||
}
|
||||
offset += ehdr.offset;
|
||||
}
|
||||
|
||||
// Skip node records
|
||||
lseek(fh, (long)(cfg->NodeCnt)*(long)sizeof(FeNode5), SEEK_CUR);
|
||||
|
||||
// The *.MSG netmail area
|
||||
aa.reset();
|
||||
aa.aka = CAST(ftn_addr, aka[0].main);
|
||||
aa.type = GMB_NET;
|
||||
aa.attr = attribsnet;
|
||||
aa.msgbase = fidomsgtype;
|
||||
aa.setpath(cfg->NetMPath);
|
||||
aa.setdesc("FastEcho Netmail");
|
||||
aa.setautoid("NETMAIL");
|
||||
AddNewArea(aa);
|
||||
|
||||
// All the echomail areas
|
||||
for(int n=0; n<cfg->AreaCnt; n++) {
|
||||
read(fh, area, sizeof(FeArea5));
|
||||
if(area->board != AREA_DELETED) {
|
||||
aa.reset();
|
||||
aa.aka = CAST(ftn_addr, aka[area->flags.aka].main);
|
||||
switch(area->flags.type) {
|
||||
case QBBS:
|
||||
aa.msgbase = GMB_HUDSON;
|
||||
aa.board = area->board;
|
||||
break;
|
||||
case FIDO:
|
||||
aa.msgbase = fidomsgtype;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case SQUISH:
|
||||
aa.msgbase = GMB_SQUISH;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case JAM:
|
||||
aa.msgbase = GMB_JAM;
|
||||
aa.setpath(area->path);
|
||||
break;
|
||||
case PT_BOARD:
|
||||
default:
|
||||
// Passthrough or unknown
|
||||
continue;
|
||||
}
|
||||
|
||||
switch(area->type) {
|
||||
case AREA_ECHOMAIL:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
case AREA_NETMAIL:
|
||||
aa.type = GMB_NET;
|
||||
aa.attr = attribsnet;
|
||||
break;
|
||||
case AREA_LOCAL:
|
||||
aa.type = GMB_LOCAL;
|
||||
aa.attr = attribslocal;
|
||||
break;
|
||||
case AREA_BADMAILBOARD:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
case AREA_DUPEBOARD:
|
||||
aa.type = GMB_ECHO;
|
||||
aa.attr = attribsecho;
|
||||
break;
|
||||
default:
|
||||
// Unknown type
|
||||
continue;
|
||||
|
||||
}
|
||||
aa.setdesc(area->desc);
|
||||
aa.setechoid(area->name);
|
||||
aa.setorigin(cfg->OriginLine[area->flags.origin]);
|
||||
aa.groupid = (char)('A' + area->flags.group);
|
||||
AddNewArea(aa);
|
||||
}
|
||||
}
|
||||
|
||||
throw_free(aka);
|
||||
throw_free(area);
|
||||
throw_free(cfg);
|
||||
}
|
||||
|
||||
|
||||
// ------------------------------------------------------------------
|
||||
|
@@ -200,7 +200,11 @@ void gareafile::ReadFastecho(char* tag) {
|
||||
read(fh, &revision, sizeof(revision));
|
||||
lseek(fh, 0L, SEEK_SET); // rewind
|
||||
|
||||
if(revision == 6)
|
||||
if(revision == 4)
|
||||
ReadFastecho11x(fh);
|
||||
else if(revision == 5)
|
||||
ReadFastecho141(fh);
|
||||
else if(revision == 6)
|
||||
ReadFastecho142(fh);
|
||||
else
|
||||
cout << "* Error: FastEcho system file revision level " << revision << " is not supported - Skipping." << endl;
|
||||
|
Reference in New Issue
Block a user