home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Elysian Archive
/
AmigaElysianArchive.iso
/
prog
/
c
/
afixsrc.lha
/
AreaFix.h
< prev
next >
Wrap
C/C++ Source or Header
|
1990-04-08
|
5KB
|
182 lines
/*======================================================================*/
/* AreaFix.h - Header for AreaFix by Russel Miranda */
/*======================================================================*/
/* The title and version(s)... */
/*----------------------------------------------------------------------*/
char *prgname="Paragon AreaFix";
char *version="1.02";
char *hiptver="PAfxHpt001";
/*----------------------------------------------------------------------*/
/* The files we need... */
/*----------------------------------------------------------------------*/
#include <proto/dos.h>
#include <stdio.h>
#include <ctype.h>
#include <paragon.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <stdarg.h>
#include <parconlnk.h>
/*----------------------------------------------------------------------*/
/* The structures for the linked lists. There are a LOT of them in */
/* this one. Seemed to work best for this project, where there was a */
/* variable number of items, and I didn't want to limit it to a maximum */
/*----------------------------------------------------------------------*/
struct request
{
struct request *next;
struct address *firstadr;
struct address *lastadr;
char tag[16];
};
struct address
{
short zone;
short net;
short node;
struct address *nextnode;
};
struct fwdsys
{
struct fwdsys *next;
struct address adr;
struct fwdarea *firstarea;
struct fwdarea *lastarea;
char password[16];
};
struct fwdarea
{
struct fwdarea *next;
char tag[16];
};
struct area
{
struct area *next;
struct address *firstnode;
struct address *lastnode;
short areanum;
char areatag[16];
};
struct alias
{
char name[36];
struct alias *nextalias;
};
struct pass
{
char pass[10];
short level;
struct address adr;
struct pass *nextpass;
};
struct protect
{
char tag[16];
short level;
struct protect *nextprot;
};
/*----------------------------------------------------------------------*/
/* This is the only structure not used for a linked list... it's all */
/* alone... */
/*----------------------------------------------------------------------*/
struct himark
{
char version[10];
short basenumber;
short highmsg;
};
/*----------------------------------------------------------------------*/
/* The function prototypes. This is a good idea for any other Lattice */
/* owners. Helps you track down a LOT of bugs. */
/* */
/* Also, since you have to tell Lattice that a function returns some- */
/* thing other than an integer, you might as well put the prototyping */
/* there anyway! */
/*----------------------------------------------------------------------*/
void EXit(int level);
FILE *MessageOpen(struct address *dest,char *to,char *from,int area,char *subject,char *MsgName);
void MessageClose(FILE *file,int area,char *MsgName);
void ActiveAreas(FILE *file,struct address *adr);
void AvailAreas(FILE *file,struct address *adr);
void AliasAdd(char *addition);
int AliasMatch(char *match);
void PassAdd(struct address *add,char *text,short number);
void ProtAdd(char *tag,short level);
int GoodLevel(struct address *where,char *tag);
void SyntaxEr(char *err);
void lprintf(char *fmt, ...);
void TimeStr(char *str);
void ReScan(struct area *Area);
void List(struct address *dest,int area);
void NoMem(void);
int PassMatch(struct address *where,char *password);
int GetLine(FILE *file,char *str);
int validarea(int number);
int SecLevel(struct address *where);
struct area *AreaAdd(short number);
struct area *FindAreaT(char *match);
struct address *FindNode(struct area *where,struct address *match);
void NodeAdd(struct area *to,struct address *add);
void AddQue(struct request *to, int net, int node);
int cmpnode(struct address *one,struct address *two);
int RemoveNode(struct area *from,struct address *adr);
int ownbase(int number);
void OutputAreas(char *outfile);
void InputAreas(char *change,char *in);
void ForwardReq(char *tag,struct address *from,int area,char *pswd);
int AvailFrom(struct address *where,char *tag,char *pass);
void BuildReqLst(void);
int AddReq(char *tag, struct address *source, struct address *dest);
void ProcQue(char *change,int searchbase);
void SaveQue(void);
struct request *AddQueArea(char *tag);
void AddFwd(char *tag,struct address *from,char *pswd);
void AddFwdArea(struct fwdsys *system,char *tag);
void SendFwd(int area);
void SaveHiMk(short search,short point);
short GetHiMk(short search);
void ReadCfg(char *cfgname, char *in, char *out, int *forward, int *search);
/*----------------------------------------------------------------------*/
/* The global variables... Includes the pointers to the first and last */
/* items of the main lists. */
/*----------------------------------------------------------------------*/
char *bbspath;
char *oldname;
char *filename;
FILE *replymsg;
struct area *first;
struct area *last;
struct alias *falias;
struct alias *lalias;
struct pass *fpass;
struct pass *lpass;
struct protect *fprot;
struct protect *lprot;
struct request *firstreq;
struct request *lastreq;
struct fwdsys *firstFS;
struct fwdsys *lastFS;
struct fig *bbsconfig;
struct Task *mytask;
/* EOF */