Annotation of 43BSDReno/contrib/isode-beta/doc/manual/grindB-5.tex, revision 1.1

1.1     ! root        1: \File{grindB\-5.c},{22:23},{Jun 12 1988}
        !             2: \L{\LB{\K{\#include} \<stdio.h\>}}
        !             3: \L{\LB{\K{\#include} \<isode\/rtsap.h\>}}
        !             4: \L{\LB{\K{\#include} \<isode\/isoservent.h\>}}
        !             5: \L{\LB{}}
        !             6: \L{\LB{}}
        !             7: \L{\LB{\Proc{main}main (argc, argv, envp)}}
        !             8: \L{\LB{\K{int}}\Tab{8}{argc;}}
        !             9: \L{\LB{\K{char}  **argv,}}
        !            10: \L{\LB{      **envp;}}
        !            11: \L{\LB{\{}}
        !            12: \L{\LB{    \K{int}}\Tab{8}{    result,}}
        !            13: \L{\LB{}\Tab{8}{    sd;}}
        !            14: \L{\LB{    \K{struct} RoSAPindication  rois;}}
        !            15: \L{\LB{    \K{register} \K{struct} RoSAPindication *roi = \&rois;}}
        !            16: \L{\LB{    \K{register} \K{struct} RoSAPpreject   *rop = \&roi \-\> roi\_preject;}}
        !            17: \L{\LB{    \K{struct} RtSAPstart   rtss;}}
        !            18: \L{\LB{    \K{register} \K{struct} RtSAPstart *rts = \&rtss;}}
        !            19: \L{\LB{    \K{struct} RtSAPindication  rtis;}}
        !            20: \L{\LB{    \K{register} \K{struct} RtSAPindication *rti = \&rtis;}}
        !            21: \L{\LB{    \K{register} \K{struct} RtSAPabort   *rta = \&rti \-\> rti\_abort;}}
        !            22: \L{\LB{}}
        !            23: \L{\LB{    \K{if} (RtInit (argc, argv, rts, rti) == NOTOK)}}
        !            24: \L{\LB{}\Tab{8}{error (\S{}\"initialization fails: \%s\"\SE{}, RtErrString (rta \-\> rta\_reason));}}
        !            25: \L{\LB{}}
        !            26: \L{\LB{    sd = rts \-\> rts\_sd;}}
        !            27: \L{\LB{\C{}\/*  do authentication using rts \-\> rts\_data here... *\/\CE{}}}
        !            28: \L{\LB{    RTSFREE (rts);}}
        !            29: \L{\LB{    }}
        !            30: \L{\LB{\C{}\/* read command line arguments here... *\/\CE{}}}
        !            31: \L{\LB{}}
        !            32: \L{\LB{\C{}\/* could use RTS\_BUSY, RTS\_VALIDATE, or RTS\_MODE instead and then exit *\/\CE{}}}
        !            33: \L{\LB{}}
        !            34: \L{\LB{    \K{if} (RtBeginResponse (sd, RTS\_ACCEPT, NULLPE, rti) == NOTOK)}}
        !            35: \L{\LB{}\Tab{8}{error (\S{}\"RT\-BEGIN.RESPONSE: \%s\"\SE{}, RtErrString (rta \-\> rta\_reason));}}
        !            36: \L{\LB{}}
        !            37: \L{\LB{    \K{if} (RoSetService (sd, RoPService, roi) == NOTOK)}}
        !            38: \L{\LB{}\Tab{8}{error (\S{}\"RoSetService: \%s\"\SE{}, RoErrString (rop \-\> rop\_reason));}}
        !            39: \L{\LB{}}
        !            40: \L{\LB{    \K{for} (;;)}}
        !            41: \L{\LB{}\Tab{8}{\K{switch} (result = RoWaitRequest (sd, NOTOK, roi)) \{}}
        !            42: \L{\LB{}\Tab{8}{    \K{case} NOTOK: }}
        !            43: \L{\LB{}\Tab{8}{    \K{case} OK: }}
        !            44: \L{\LB{}\Tab{8}{    \K{case} DONE: }}
        !            45: \L{\LB{}\Tab{16}{ros\_indication (sd, roi);}}
        !            46: \L{\LB{}\Tab{16}{\K{break};}}
        !            47: \L{\LB{}}
        !            48: \L{\LB{}\Tab{8}{    \K{default}: }}
        !            49: \L{\LB{}\Tab{16}{error (\S{}\"unknown return from RoWaitRequest=\%d\"\SE{}, result);}}
        !            50: \L{\LB{}\Tab{8}{\}}}
        !            51: \L{\LB{\}}}

unix.superglobalmegacorp.com

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