home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume26 / xinetd-2.1.1 / part01 / xinetd / parse.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-06-27  |  898 b   |  39 lines

  1. /*
  2.  * (c) Copyright 1992 by Panagiotis Tsirigotis
  3.  * All rights reserved.  The file named COPYRIGHT specifies the terms 
  4.  * and conditions for redistribution.
  5.  */
  6.  
  7. #ifndef PARSE_H
  8. #define PARSE_H
  9.  
  10. #include "defs.h"
  11.  
  12. /*
  13.  * $Id: parse.h,v 6.2 1993/06/01 22:54:25 panos Exp $
  14.  */
  15.  
  16. typedef enum { NO_ENTRY, BAD_ENTRY, SERVICE_ENTRY, DEFAULTS_ENTRY } entry_e ;
  17.  
  18. enum assign_op { SET_EQ, PLUS_EQ, MINUS_EQ } ;
  19.  
  20. struct attribute
  21. {
  22.    char        *a_name ;            /* name of attribute                            */
  23.    unsigned a_id ;               /* attribute id                                */
  24.    int        a_nvalues ;                /* number of values                            */
  25.    status_e (*a_parser)() ;        /* function that parses the attribute    */
  26. } ;
  27.  
  28.  
  29. #define ENTRY_BEGIN              '{'
  30. #define ENTRY_END                '}'
  31. #define COMMENT_BEGIN            '#'
  32. #define KW_SERVICE                    "service"
  33. #define KW_DEFAULTS                    "defaults"
  34.  
  35. extern int line_count ;
  36.  
  37. #endif    /* PARSE_H */
  38.  
  39.