Annotation of 43BSDReno/contrib/isode-beta/pepy/test.asn1/tes.py, revision 1.1.1.1

1.1       root        1: Fred DEFINITIONS IMPLICIT TAGS ::=
                      2: %{
                      3: int    br = 10;
                      4: int    frd = 9;
                      5: %}
                      6: BEGIN
                      7: 
                      8: SECTIONS build parse print
                      9: 
                     10: Barney ::= SEQUENCE {
                     11:        COMPONENTS OF Fred,
                     12:        wilma INTEGER [[i frd]],
                     13:        fred INTEGER [[i frd]],
                     14:        pets SEQUENCE SIZE (1..MAX) OF INTEGER }
                     15: 
                     16: Fred ::= SEQUENCE {
                     17:        barney-rubble INTEGER [[i br]],
                     18:        betty-rubble INTEGER [[i br]],
                     19:        the-dog REAL }
                     20: 
                     21: END
                     22: %{
                     23: #include <stdio.h>
                     24: 
                     25: char   *myname;
                     26: 
                     27: main (argc, argv)
                     28: int    argc;
                     29: char   **argv;
                     30: {
                     31:        PE      pe;
                     32:        PE      pe2;
                     33: 
                     34:        myname = argv[0];
                     35: 
                     36:        build_Fred_Barney(&pe, 1, 0, NULLCP, NullParm);
                     37:        build_Fred_Fred(&pe2, 1, 0, NULLCP, NullParm);
                     38:        parse_Fred_Barney(pe, 1, NULLIP, NULLVP, NullParm);
                     39:        parse_Fred_Fred(pe2, 1, NULLIP, NULLVP, NullParm);
                     40:        print_Fred_Barney(pe, 1, NULLIP, NULLVP, NullParm);
                     41:        print_Fred_Fred(pe2, 1, NULLIP, NULLVP, NullParm);
                     42:        exit (0);
                     43: }
                     44: 
                     45: 
                     46: /* VARARGS2 */
                     47: 
                     48: adios (what, fmt, a, b, c, d, e, f, g, h, i, j)
                     49: char   *what,
                     50:        *fmt,
                     51:        *a,
                     52:        *b,
                     53:        *c,
                     54:        *d,
                     55:        *e,
                     56:        *f,
                     57:        *g,
                     58:        *h,
                     59:        *i,
                     60:        *j;
                     61: {
                     62:     advise (what, fmt, a, b, c, d, e, f, g, h, i, j);
                     63:     _exit (1);
                     64: }
                     65: 
                     66: /*  */
                     67: 
                     68: /* VARARGS2 */
                     69: 
                     70: void advise (what, fmt, a, b, c, d, e, f, g, h, i, j)
                     71: char   *what,
                     72:        *fmt,
                     73:        *a,
                     74:        *b,
                     75:        *c,
                     76:        *d,
                     77:        *e,
                     78:        *f,
                     79:        *g,
                     80:        *h,
                     81:        *i,
                     82:        *j;
                     83: {
                     84:     (void) fflush (stdout);
                     85: 
                     86:     fprintf (stderr, "%s: ", myname);
                     87:     fprintf (stderr, fmt, a, b, c, d, e, f, g, h, i, j);
                     88:     if (what)
                     89:        (void) fputc (' ', stderr), perror (what);
                     90:     else
                     91:        (void) fputc ('\n', stderr);
                     92: 
                     93:     (void) fflush (stderr);
                     94: }
                     95: 
                     96: 
                     97: %}

unix.superglobalmegacorp.com

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