/*******************************************************************************
* SMP00 Sample of an SGML Application Interfaced with the YASP Parser          *
*------------------------------------------------------------------------------*
* Written 1987 - 1993 by                                                       *
*         Pierre G. Richard                                                    *
*         IBM T.J. Watson Research Center                                      *
*         Yorktown Heights, New York                                           *
*         petrus@watson.ibm.com                                                *
*-----------------------------------------------------------------------------*
* FUNCTION NAME    = YASP / Application  - Header file                        *
* STATUS           = N/A                                                      *
* COMPONENT NAME   = keeper.h                                                 *
* DESCRIPTIVE NAME = Prototype functions in keeper.c                          *
* DATE_WR          = 09/12/1988                                               *
* AUTHOR           = Pierre G. Richard - PETRUS at YKTVMX                     *
*                                                                             *
* FUNCTIONAL DESCRIPTION =                                                    *
*                                                                             *
* CHANGE HISTORY =                                                            *
* Number Date     Inits    Change & reason (brief)                            *
******************************************************************************/

typedef enum {
   ELT_TRKN  = 0x01,
   DATA_TRKN = 0x02,
   SRM_TRKN  = 0x04
}TRKN;

typedef struct t_TREE_FLAGS {
   uint ltag     :1;
   uint rtag     :1;
   uint trkn     :3;                 /* see TRKN enum */
   uint net      :1;
   uint daddy    :1;                 /* initially 0, for application own use */
   uint expanded :1;                 /* initially 0, for application own use */
   uint unused   :8;                 /* for future use */
}TREE_FLAGS;

typedef struct TREE_t {
   TREE_FLAGS     is;
   struct TREE_t *llink;
   struct TREE_t *rlink;
   union {
      ELT  *elt_p;
      SRM  *srm_p;
      uint i;
   }info;
}TREE;

extern void    kep_data (uint);                     /* Remember Data (length) */
extern void    kep_elt  (ELT *, boolean);           /* Remember start-Tag */
extern void    kep_end  (void);                     /* Remember End-Tag */
extern void    kep_map  (SRM *);                    /* Remember USEMAP */
extern void    kep_show (void);                     /* Show the current tree */
extern ELT    *kep_qcur (void);                     /* Get current ELT */
/*****************************************************************************/
