Annotation of 43BSDReno/contrib/isode-beta/doc/manual/grind2c-2.c, revision 1.1.1.1

1.1       root        1: #include <stdio.h>
                      2: #include <isode/rtsap.h>
                      3: 
                      4: 
                      5: main (argc, argv, envp)
                      6: int    argc;
                      7: char  **argv,
                      8:       **envp;
                      9: {
                     10:     int            result,
                     11:            sd;
                     12:     struct RoSAPindication  rois;
                     13:     register struct RoSAPindication *roi = &rois;
                     14:     register struct RoSAPpreject   *rop = &roi -> roi_preject;
                     15:     struct RtSAPstart   rtss;
                     16:     register struct RtSAPstart *rts = &rtss;
                     17:     struct AcSAPstart *acs = &rts -> rts_start;
                     18:     strut PSAPstart *ps = &acs -> acs_start;
                     19:     struct RtSAPindication  rtis;
                     20:     register struct RtSAPindication *rti = &rtis;
                     21:     register struct RtSAPabort   *rta = &rti -> rti_abort;
                     22: 
                     23:     if (RtInit (argc, argv, rts, rti) == NOTOK)
                     24:        error ("initialization fails: %s", RtErrString (rta -> rta_reason));
                     25: 
                     26:     sd = rts -> rts_sd;
                     27:     RTSFREE (rts);
                     28:     
                     29: /* read command line arguments here... */
                     30: 
                     31:     if (RtOpenResponse (sd, ACS_ACCEPT, NULLOID, NULLAEI,
                     32:                &ps -> ps_called, NULLPC, ps -> ps_defctxresult,
                     33:                NULLPE, rti) == NOTOK)
                     34:        error ("RT-OPEN.RESPONSE: %s", RtErrString (rta -> rta_reason));
                     35: 
                     36:     if (RoSetService (sd, RoRtService, roi) == NOTOK)
                     37:        error ("RoSetService: %s", RoErrString (rop -> rop_reason));
                     38: 
                     39:     for (;;)
                     40:        switch (result = RoWaitRequest (sd, NOTOK, roi)) {
                     41:            case NOTOK: 
                     42:            case OK: 
                     43:            case DONE: 
                     44:                ros_indication (sd, roi);
                     45:                break;
                     46: 
                     47:            default: 
                     48:                error ("unknown return from RoWaitRequest=%d", result);
                     49:        }
                     50: }

unix.superglobalmegacorp.com

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