home *** CD-ROM | disk | FTP | other *** search
/ Amiga Elysian Archive / AmigaElysianArchive.iso / prog / c / afixsrc.lha / AreaFix.h < prev    next >
C/C++ Source or Header  |  1990-04-08  |  5KB  |  182 lines

  1. /*======================================================================*/
  2. /* AreaFix.h - Header for AreaFix by Russel Miranda            */
  3. /*======================================================================*/
  4. /* The title and version(s)...                        */
  5. /*----------------------------------------------------------------------*/
  6.  
  7. char *prgname="Paragon AreaFix";
  8. char *version="1.02";
  9. char *hiptver="PAfxHpt001";
  10.  
  11. /*----------------------------------------------------------------------*/
  12. /* The files we need...                            */
  13. /*----------------------------------------------------------------------*/
  14.  
  15. #include <proto/dos.h>
  16. #include <stdio.h>
  17. #include <ctype.h>
  18. #include <paragon.h>
  19. #include <string.h>
  20. #include <stdlib.h>
  21. #include <time.h>
  22. #include <stdarg.h>
  23. #include <parconlnk.h>
  24.  
  25.  
  26. /*----------------------------------------------------------------------*/
  27. /* The structures for the linked lists.  There are a LOT of them in    */
  28. /* this one.  Seemed to work best for this project, where there was a    */
  29. /* variable number of items, and I didn't want to limit it to a maximum    */
  30. /*----------------------------------------------------------------------*/
  31.  
  32. struct request
  33. {
  34.     struct request *next;
  35.     struct address *firstadr;
  36.     struct address *lastadr;
  37.     char tag[16];
  38. };
  39.  
  40. struct address
  41. {
  42.     short zone;
  43.     short net;
  44.     short node;
  45.     struct address *nextnode;
  46. };
  47.  
  48. struct fwdsys
  49. {
  50.     struct fwdsys *next;
  51.     struct address adr;
  52.     struct fwdarea *firstarea;
  53.     struct fwdarea *lastarea;
  54.     char password[16];
  55. };
  56.  
  57. struct fwdarea
  58. {
  59.     struct fwdarea *next;
  60.     char tag[16];
  61. };
  62.  
  63. struct area
  64. {
  65.     struct area *next;
  66.     struct address *firstnode;
  67.     struct address *lastnode;
  68.     short areanum;
  69.     char areatag[16];
  70. };
  71.  
  72. struct alias
  73. {
  74.     char name[36];
  75.     struct alias *nextalias;
  76. };
  77.  
  78. struct pass
  79. {
  80.     char pass[10];
  81.     short level;
  82.     struct address adr;
  83.     struct pass *nextpass;
  84. };
  85.  
  86. struct protect
  87. {
  88.     char tag[16];
  89.     short level;
  90.     struct protect *nextprot;
  91. };
  92.  
  93. /*----------------------------------------------------------------------*/
  94. /* This is the only structure not used for a linked list... it's all    */
  95. /* alone...                                */
  96. /*----------------------------------------------------------------------*/
  97.  
  98. struct himark
  99. {
  100.     char version[10];
  101.     short basenumber;
  102.     short highmsg;
  103. };
  104.  
  105. /*----------------------------------------------------------------------*/
  106. /* The function prototypes.  This is a good idea for any other Lattice    */
  107. /* owners.  Helps you track down a LOT of bugs.                */
  108. /*                                    */
  109. /* Also, since you have to tell Lattice that a function returns some-    */
  110. /* thing other than an integer, you might as well put the prototyping    */
  111. /* there anyway!                            */
  112. /*----------------------------------------------------------------------*/
  113.  
  114. void EXit(int level);
  115. FILE *MessageOpen(struct address *dest,char *to,char *from,int area,char *subject,char *MsgName);
  116. void MessageClose(FILE *file,int area,char *MsgName);
  117. void ActiveAreas(FILE *file,struct address *adr);
  118. void AvailAreas(FILE *file,struct address *adr);
  119. void AliasAdd(char *addition);
  120. int AliasMatch(char *match);
  121. void PassAdd(struct address *add,char *text,short number);
  122. void ProtAdd(char *tag,short level);
  123. int GoodLevel(struct address *where,char *tag);
  124. void SyntaxEr(char *err);
  125. void lprintf(char *fmt, ...);
  126. void TimeStr(char *str);
  127. void ReScan(struct area *Area);
  128. void List(struct address *dest,int area);
  129. void NoMem(void);
  130. int PassMatch(struct address *where,char *password);
  131. int GetLine(FILE *file,char *str);
  132. int validarea(int number);
  133. int SecLevel(struct address *where);
  134. struct area *AreaAdd(short number);
  135. struct area *FindAreaT(char *match);
  136. struct address *FindNode(struct area *where,struct address *match);
  137. void NodeAdd(struct area *to,struct address *add);
  138. void AddQue(struct request *to, int net, int node);
  139. int cmpnode(struct address *one,struct address *two);
  140. int RemoveNode(struct area *from,struct address *adr);
  141. int ownbase(int number);
  142. void OutputAreas(char *outfile);
  143. void InputAreas(char *change,char *in);
  144. void ForwardReq(char *tag,struct address *from,int area,char *pswd);
  145. int AvailFrom(struct address *where,char *tag,char *pass);
  146. void BuildReqLst(void);
  147. int AddReq(char *tag, struct address *source, struct address *dest);
  148. void ProcQue(char *change,int searchbase);
  149. void SaveQue(void);
  150. struct request *AddQueArea(char *tag);
  151. void AddFwd(char *tag,struct address *from,char *pswd);
  152. void AddFwdArea(struct fwdsys *system,char *tag);
  153. void SendFwd(int area);
  154. void SaveHiMk(short search,short point);
  155. short GetHiMk(short search);
  156. void ReadCfg(char *cfgname, char *in, char *out, int *forward, int *search);
  157.  
  158. /*----------------------------------------------------------------------*/
  159. /* The global variables... Includes the pointers to the first and last    */
  160. /* items of the main lists.                        */
  161. /*----------------------------------------------------------------------*/
  162.  
  163. char *bbspath;
  164. char *oldname;
  165. char *filename;
  166. FILE *replymsg;
  167. struct area *first;
  168. struct area *last;
  169. struct alias *falias;
  170. struct alias *lalias;
  171. struct pass *fpass;
  172. struct pass *lpass;
  173. struct protect *fprot;
  174. struct protect *lprot;
  175. struct request *firstreq;
  176. struct request *lastreq;
  177. struct fwdsys *firstFS;
  178. struct fwdsys *lastFS;
  179. struct fig *bbsconfig;
  180. struct Task *mytask;
  181.  
  182. /* EOF */