Annotation of 43BSDReno/contrib/isode-beta/pepsy/pepsy.h.gnrc, revision 1.1.1.1

1.1       root        1: %BEGIN(PEPSY)%
                      2: /* pepsy.h - definitions for pepsy */
                      3: %END(PEPSY)%
                      4: %BEGIN(PEPY)%
                      5: /* pepy.h - definitions for pepy */
                      6: %END(PEPY)%
                      7: %BEGIN(ROSY)%
                      8: /* rosy-defs.h - definitions for rosy */
                      9: %END(ROSY)%
                     10: %BEGIN(MOSY)%
                     11: /* mosy-defs.h - definitions for mosy */
                     12: %END(MOSY)%
                     13: /* %WARNING% */
                     14: 
                     15: /* 
                     16:  * $Header: /f/osi/pepsy/RCS/pepsy.h.gnrc,v 7.0 90/07/01 19:54:36 mrose Exp $
                     17:  *
                     18:  *
                     19:  * $Log:       pepsy.h.gnrc,v $
                     20:  * Revision 7.0  90/07/01  19:54:36  mrose
                     21:  * *** empty log message ***
                     22:  * 
                     23:  * Revision 7.0  89/11/23  22:11:48  mrose
                     24:  * Release 6.0
                     25:  * 
                     26:  * Revision 6.1  89/07/30  12:16:16  mrose
                     27:  */
                     28: 
                     29: /*
                     30:  *                               NOTICE
                     31:  *
                     32:  *    Acquisition, use, and distribution of this module and related
                     33:  *    materials are subject to the restrictions of a license agreement.
                     34:  *    Consult the Preface in the User's Manual for the full terms of
                     35:  *    this agreement.
                     36:  *
                     37:  */
                     38: 
                     39: 
                     40: #include "psap.h"
                     41: 
                     42: struct tuple {
                     43:     int     t_type;
                     44:     char   *t_class;
                     45:     char   *t_form;
                     46:     char   *t_id;
                     47:     PElementClass t_classnum;
                     48:     int            t_idnum;
                     49: };
                     50: 
                     51: typedef struct ypv {
                     52:     int     yv_code;
                     53: #define        YV_UNDF         0x00    /* ??? */
                     54: #define        YV_NUMBER       0x01    /* LITNUMBER */
                     55: #define        YV_BOOL         0x02    /* TRUE | FALSE */
                     56: #define        YV_STRING       0x03    /* LITSTRING */
                     57: #define        YV_IDEFINED     0x04    /* ID */
                     58: #define        YV_IDLIST       0x05    /* IdentifierList */
                     59: #define        YV_VALIST       0x06    /* { Values } */
                     60: #define        YV_NULL         0x07    /* NULL */
                     61: #define YV_ABSENT      0x08    /* WITH COMPONENTS .. ABSENT */
                     62: #define YV_PRESENT     0x09    /*  "   "          .. PRESENT */
                     63: #define YV_INCLUDES    0x0a    /* INCLUDES ... */
                     64: #define YV_WITHCOMPS   0x0b    /* WITH COMPONENTS */
                     65: #define        YV_OIDLIST      0x0c    /* { object identifier } */
                     66: #define YV_REAL                0x0d    /* real value */
                     67: 
                     68:     union {
                     69:        int         yv_un_number;               /* code = YV_NUMBER
                     70:                                                   code = YV_BOOL */
                     71: 
                     72:        double      yv_un_real;                 /* code = YV_REAL */
                     73: 
                     74:        char       *yv_un_string;               /* code = YV_STRING */
                     75: 
                     76:        struct {                                /* code = YV_IDEFINED */
                     77:            char   *yv_st_module;
                     78:            char   *yv_st_modid;
                     79:            char   *yv_st_identifier;
                     80:        }               yv_st;
                     81: 
                     82:         struct ypv *yv_un_idlist;              /* code = YV_IDLIST
                     83:                                                   code = YV_VALIST
                     84:                                                   code = YV_OIDLIST */
                     85:     }                   yv_un;
                     86: #define        yv_number       yv_un.yv_un_number
                     87: #define        yv_string       yv_un.yv_un_string
                     88: #define        yv_identifier   yv_un.yv_st.yv_st_identifier
                     89: #define        yv_module       yv_un.yv_st.yv_st_module
                     90: #define yv_modid       yv_un.yv_st.yv_st_modid
                     91: #define yv_idlist      yv_un.yv_un_idlist
                     92: #define yv_real                yv_un.yv_un_real
                     93: 
                     94:     char   *yv_action;
                     95:     int            yv_act_lineno;
                     96: 
                     97:     int            yv_flags;
                     98: #define        YV_NOFLAGS      0x00    /* no flags */
                     99: #define        YV_ID           0x01    /* ID Value */
                    100: #define        YV_NAMED        0x02    /* NamedNumber */
                    101: #define        YV_TYPE         0x04    /* TYPE Value */
                    102: #define        YV_BOUND        0x08    /* named value */
                    103: #define        YVBITS  "\020\01ID\02NAMED\03TYPE\04BOUND"
                    104: 
                    105:     char   *yv_id;                             /* flags & YV_ID */
                    106: 
                    107:     char   *yv_named;                          /* flags & YV_NAMED */
                    108: 
                    109:     struct ype *yv_type;                       /* flags & YV_TYPE */
                    110: 
                    111:     struct ypv *yv_next;
                    112: }                      ypv, *YV;
                    113: #define        NULLYV  ((YV) 0)
                    114: 
                    115: YV     new_value (), add_value (), copy_value ();
                    116: 
                    117: /*  */
                    118: 
                    119: typedef struct ypt {
                    120:     PElementClass   yt_class;
                    121: 
                    122:     YV             yt_value;
                    123: }                      ypt, *YT;
                    124: #define        NULLYT  ((YT) 0)
                    125: 
                    126: YT     new_tag (), copy_tag ();
                    127: 
                    128: /*  */
                    129: 
                    130: typedef struct ype {
                    131:     int     yp_code;
                    132: #define        YP_UNDF         0x00    /* type not yet known */
                    133: #define        YP_BOOL         0x01    /* BOOLEAN */
                    134: #define        YP_INT          0x02    /* INTEGER */
                    135: #define        YP_INTLIST      0x03    /* INTEGER [ NamedNumberList ] */
                    136: #define        YP_BIT          0x04    /* BITSTRING */
                    137: #define        YP_BITLIST      0x05    /* BITSTRING [ NamedNumberList ] */
                    138: #define        YP_OCT          0x06    /* OCTETSTRING */
                    139: #define        YP_NULL         0x07    /* NULL */
                    140: #define        YP_SEQ          0x08    /* SEQUENCE */
                    141: #define        YP_SEQTYPE      0x09    /* SEQUENCE OF Type */
                    142: #define        YP_SEQLIST      0x0a    /* SEQUENCE [ ElementTypes ] */
                    143: #define        YP_SET          0x0b    /* SET */
                    144: #define        YP_SETTYPE      0x0c    /* SET OF Type */
                    145: #define        YP_SETLIST      0x0d    /* SET [ MemberTypes ] */
                    146: #define        YP_CHOICE       0x0e    /* CHOICE [ AlternativeTypeList ] */
                    147: #define        YP_ANY          0x0f    /* ANY */
                    148: #define        YP_OID          0x10    /* OBJECT IDENTIFIER */
                    149: #define        YP_IDEFINED     0x11    /* identifier */
                    150: #define YP_ENUMLIST    0x12    /* ENUMERATED */
                    151: #define YP_REAL                0x13    /* Real (floating-point) */
                    152: 
                    153:     int     yp_direction;
                    154: #define YP_DECODER     0x01
                    155: #define YP_ENCODER     0x02
                    156: #define        YP_PRINTER      0x04
                    157: 
                    158:     union {
                    159:        struct {                                /* code = YP_IDEFINED */
                    160:            char   *yp_st_module;                   /* module name */
                    161:            OID     yp_st_modid;                    /* module id */
                    162:            char   *yp_st_identifier;               /* definition name */
                    163:        }               yp_st;
                    164: 
                    165:        struct ype *yp_un_type;                 /* code = YP_SEQTYPE
                    166:                                                   code = YP_SEQLIST
                    167:                                                   code = YP_SETTYPE
                    168:                                                   code = YP_SETLIST
                    169:                                                   code = YP_CHOICE */
                    170: 
                    171:        YV          yp_un_value;                /* code = YP_INTLIST
                    172:                                                   code = YP_BITLIST */
                    173:     }                   yp_un;
                    174: #define        yp_identifier   yp_un.yp_st.yp_st_identifier
                    175: #define        yp_module       yp_un.yp_st.yp_st_module
                    176: #define yp_modid       yp_un.yp_st.yp_st_modid
                    177: #define        yp_type         yp_un.yp_un_type
                    178: #define        yp_value        yp_un.yp_un_value
                    179: 
                    180:     char   *yp_intexp;         /* expressions to pass (use) as extra */
                    181:     char   *yp_strexp;         /* parameters (primitive values) */
                    182:     char    yp_prfexp;
                    183: 
                    184:     char   *yp_declexp;
                    185:     char   *yp_varexp;
                    186: 
                    187:     char   *yp_structname;
                    188:     char   *yp_ptrname;
                    189: 
                    190:     char   *yp_param_type;
                    191: 
                    192:     char   *yp_action0;
                    193:     int     yp_act0_lineno;
                    194: 
                    195:     char   *yp_action05;
                    196:     int            yp_act05_lineno;
                    197: 
                    198:     char   *yp_action1;
                    199:     int            yp_act1_lineno;
                    200: 
                    201:     char   *yp_action2;
                    202:     int            yp_act2_lineno;
                    203: 
                    204:     char   *yp_action3;
                    205:     int            yp_act3_lineno;
                    206: 
                    207:     int     yp_flags;
                    208: #define        YP_NOFLAGS      0x0000  /* no flags */
                    209: #define        YP_OPTIONAL     0x0001  /* OPTIONAL */
                    210: #define        YP_COMPONENTS   0x0002  /* COMPONENTS OF */
                    211: #define        YP_IMPLICIT     0x0004  /* IMPLICIT */
                    212: #define        YP_DEFAULT      0x0008  /* DEFAULT */
                    213: #define        YP_ID           0x0010  /* ID */
                    214: #define        YP_TAG          0x0020  /* Tag */
                    215: #define        YP_BOUND        0x0040  /* ID LANGLE */
                    216: #define        YP_PULLEDUP     0x0080  /* member is a choice */
                    217: #define YP_PARMVAL     0x0100  /* value to be passed to parm is present */
                    218: #define YP_CONTROLLED  0x0200  /* encoding item has a controller */
                    219: #define        YP_OPTCONTROL   0x0400  /*   .. */
                    220: #define        YP_ACTION1      0x0800  /* action1 acted upon */
                    221: #define        YP_PARMISOID    0x1000  /* value to be passed to parm is OID */
                    222: #define YP_ENCRYPTED   0x2000  /* encypted - which is a bit hazy */
                    223: #define YP_IMPORTED    0x4000  /* value imported from another module */
                    224: #define YP_EXPORTED    0x8000  /* value exported to another module */
                    225: #define        YPBITS  "\020\01OPTIONAL\02COMPONENTS\03IMPLICIT\04DEFAULT\05ID\06TAG\
                    226: \07BOUND\010PULLEDUP\011PARMVAL\012CONTROLLED\013OPTCONTROL\
                    227: \014ACTION1\015PARMISOID\016ENCRYPTED\017IMPORTED\020EXPORTED"
                    228: 
                    229:     YV     yp_default;                         /* flags & YP_DEFAULT */
                    230: 
                    231:     char   *yp_id;                             /* flags & YP_ID */
                    232: 
                    233:     YT     yp_tag;                             /* flags & YP_TAG */
                    234: 
                    235:     char   *yp_bound;                          /* flags & YP_BOUND */
                    236: 
                    237:     char   *yp_parm;                           /* flags & YP_PARMVAL */
                    238: 
                    239:     char   *yp_control;                                /* flags & YP_CONTROLLED */
                    240: 
                    241:     char   *yp_optcontrol;                     /* flags & YP_OPTCONTROL */
                    242: 
                    243:     char   *yp_offset;
                    244: 
                    245:     struct ype *yp_next;
                    246: }                      ype, *YP;
                    247: #define        NULLYP  ((YP) 0)
                    248: 
                    249: YP     new_type (), add_type (), copy_type ();
                    250: 
                    251: char   *new_string ();
                    252: 
                    253: #define        TBL_EXPORT      0
                    254: #define TBL_IMPORT     1
                    255: #define MAX_TBLS       2
                    256: 
                    257: extern int tagcontrol;
                    258: #define TAG_UNKNOWN    0
                    259: #define TAG_IMPLICIT   1
                    260: #define TAG_EXPLICIT   2
                    261: 
                    262: #define CH_FULLY       0
                    263: #define CH_PARTIAL     1
                    264: 
                    265: typedef struct yop {
                    266:     char   *yo_name;
                    267: 
                    268:     YP     yo_arg;
                    269:     YP     yo_result;
                    270:     YV     yo_errors;
                    271:     YV     yo_linked;
                    272: 
                    273:     int            yo_opcode;
                    274: }              yop, *YO;
                    275: #define        NULLYO  ((YO) 0)
                    276: 
                    277: 
                    278: typedef struct yerr {
                    279:     char   *ye_name;
                    280: 
                    281:     YP     ye_param;
                    282: 
                    283:     int            ye_errcode;
                    284: 
                    285:     int            ye_offset;
                    286: }          yerr, *YE;
                    287: #define        NULLYE  ((YE) 0)
                    288: 
                    289: /*  */
                    290: 
                    291: %BEGIN(PEPSY)%
                    292: extern char *pepsyversion;
                    293: %END(PEPSY)%
                    294: %BEGIN(PEPY)%
                    295: extern char *pepyversion;
                    296: %END(PEPY)%
                    297: %BEGIN(ROSY)%
                    298: extern char *rosyversion;
                    299: %END(ROSY)%
                    300: %BEGIN(MOSY)%
                    301: extern char *mosyversion;
                    302: %END(MOSY)%
                    303: 
                    304: extern int yysection;
                    305: extern char *yyencpref;
                    306: extern char *yydecpref;
                    307: extern char *yyprfpref;
                    308: extern char *yyencdflt;
                    309: extern char *yydecdflt;
                    310: extern char *yyprfdflt;
                    311: 
                    312: extern int yydebug;
                    313: extern int yylineno;
                    314: 
                    315: #ifndef        HPUX
                    316: extern char yytext[];
                    317: #else
                    318: extern unsigned char yytext[];
                    319: #endif
                    320: 
                    321: extern char *mymodule;
                    322: 
                    323: extern OID   mymoduleid;
                    324: 
                    325: extern char *bflag;
                    326: extern int   Cflag;
                    327: extern int   dflag;
                    328: extern int   Pflag;
                    329: extern char *sysin;
                    330: 
                    331: extern char *module_actions;
                    332: 
                    333: OID    addoid ();
                    334: OID    int2oid ();
                    335: OID    oidlookup ();
                    336: char   *oidname ();
                    337: char   *oidprint ();
                    338: 
                    339: extern int errno;

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.