Annotation of 43BSDReno/contrib/isode-beta/doc/manual/grind3-3.c, revision 1.1

1.1     ! root        1: #include <stdio.h>
        !             2: #include <isode/ppkt.h>
        !             3: 
        !             4: /* ARGSUSED */
        !             5: 
        !             6: main (argc, argv, envp)
        !             7: int    argc;
        !             8: char  **argv,
        !             9:       **envp;
        !            10: {
        !            11:     int     len;
        !            12:     char   *cp;
        !            13:     register PS            ps;
        !            14:     register PE            pe;
        !            15: 
        !            16:     if ((ps = ps_alloc (std_open)) == NULLPS)
        !            17:        error ("ps_alloc");
        !            18:     if (std_setup (ps, stdin) == NOTOK)
        !            19:        error ("std_setup: %s", ps_errno (ps -> ps_errno));
        !            20: 
        !            21:     for (;;) {
        !            22:        if ((pe = ps2pe (ps)) == NULLPE)
        !            23:            if (ps -> ps_errno)
        !            24:                error ("ps2pe: %s", ps_errno (ps -> ps_errno));
        !            25:            else
        !            26:                break;          /* end-of-file */
        !            27: 
        !            28: /* process ``pe'' here... */
        !            29: 
        !            30:            pe_free (pe);
        !            31:     }
        !            32: 
        !            33:     ps_free (ps);
        !            34: 
        !            35:     exit (0);
        !            36: }

unix.superglobalmegacorp.com

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