home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d5xx / d502 / cells.lha / CELLS / CELLSSource.lzh / cHelp.h < prev    next >
C/C++ Source or Header  |  1991-04-20  |  2KB  |  58 lines

  1. /*
  2.  *  CELLS       An Implementation of the WireWorld cellular automata
  3.  *              as described in Scientific American, Jan 1990.
  4.  *
  5.  *              Copyright 1990 by Davide P. Cervone.
  6.  *  You may use this code, provided this copyright notice is kept intact.
  7.  *  See the CELLS.HELP file for complete information on distribution conditions.
  8.  */
  9.  
  10. /*
  11.  *  File:  cHelp.h              structures used by the HELP system
  12.  */
  13.  
  14.  
  15. #include "cMemory.h"
  16.  
  17. typedef struct HelpLine HELPLINE;
  18. typedef struct HelpItem HELPITEM;
  19.  
  20.  
  21. /*
  22.  *  Linked list of lines of text for a specific topic
  23.  */
  24.  
  25. struct HelpLine
  26. {
  27.    HELPLINE *Next,*Prev;
  28.    char *Text;
  29.    UWORD TextLen;
  30.    UWORD Flags;
  31. };
  32.  
  33.  
  34. /*
  35.  *  Linked list of Help Topics
  36.  */
  37.  
  38. struct HelpItem
  39. {
  40.    HELPITEM *Next,*Prev;
  41.    char *Name;
  42.    UWORD NameLen;
  43.    UWORD Flags;
  44.       #define HLP_INUSE     BIT(15)     /* topic currently being shown */
  45.       #define HLP_LINKED    BIT(14)     /* topic is a LINK to another topic */
  46.       #define HLP_LOADED    BIT(13)     /* topics text is already loaded */
  47.       #define HLP_HASTEXT   BIT(12)     /* topic has text lines in file */
  48.       #define HLP_STATIC    BIT(11)     /* don't FREE this structure */
  49.    HELPITEM *Parent;        /* pointer to parent topic */
  50.    ULONG FilePos;           /* position in file of topics first line of text */
  51.    HELPITEM *SubTopics;     /* pointer to sub-topic lists */
  52.    HELPLINE *Text;          /* pointer to linked list of lines of help text */
  53.    char *Title;             /* this topics title (if any) */
  54.    UWORD TitleLen;
  55. };
  56.  
  57. extern HELPITEM HelpRoot;   /* first help topic in the file */
  58.