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

1.1       root        1: \File{grind2c\-2.c},{22:23},{Jun 12 1988}
                      2: \L{\LB{\K{\#include} \<stdio.h\>}}
                      3: \L{\LB{\K{\#include} \<isode\/rtsap.h\>}}
                      4: \L{\LB{}}
                      5: \L{\LB{}}
                      6: \L{\LB{\Proc{main}main (argc, argv, envp)}}
                      7: \L{\LB{\K{int}}\Tab{8}{argc;}}
                      8: \L{\LB{\K{char}  **argv,}}
                      9: \L{\LB{      **envp;}}
                     10: \L{\LB{\{}}
                     11: \L{\LB{    \K{int}}\Tab{8}{    result,}}
                     12: \L{\LB{}\Tab{8}{    sd;}}
                     13: \L{\LB{    \K{struct} RoSAPindication  rois;}}
                     14: \L{\LB{    \K{register} \K{struct} RoSAPindication *roi = \&rois;}}
                     15: \L{\LB{    \K{register} \K{struct} RoSAPpreject   *rop = \&roi \-\> roi\_preject;}}
                     16: \L{\LB{    \K{struct} RtSAPstart   rtss;}}
                     17: \L{\LB{    \K{register} \K{struct} RtSAPstart *rts = \&rtss;}}
                     18: \L{\LB{    \K{struct} AcSAPstart *acs = \&rts \-\> rts\_start;}}
                     19: \L{\LB{    strut PSAPstart *ps = \&acs \-\> acs\_start;}}
                     20: \L{\LB{    \K{struct} RtSAPindication  rtis;}}
                     21: \L{\LB{    \K{register} \K{struct} RtSAPindication *rti = \&rtis;}}
                     22: \L{\LB{    \K{register} \K{struct} RtSAPabort   *rta = \&rti \-\> rti\_abort;}}
                     23: \L{\LB{}}
                     24: \L{\LB{    \K{if} (RtInit (argc, argv, rts, rti) == NOTOK)}}
                     25: \L{\LB{}\Tab{8}{error (\S{}\"initialization fails: \%s\"\SE{}, RtErrString (rta \-\> rta\_reason));}}
                     26: \L{\LB{}}
                     27: \L{\LB{    sd = rts \-\> rts\_sd;}}
                     28: \L{\LB{    RTSFREE (rts);}}
                     29: \L{\LB{    }}
                     30: \L{\LB{\C{}\/* read command line arguments here... *\/\CE{}}}
                     31: \L{\LB{}}
                     32: \L{\LB{    \K{if} (RtOpenResponse (sd, ACS\_ACCEPT, NULLOID, NULLAEI,}}
                     33: \L{\LB{}\Tab{16}{\&ps \-\> ps\_called, NULLPC, ps \-\> ps\_defctxresult,}}
                     34: \L{\LB{}\Tab{16}{NULLPE, rti) == NOTOK)}}
                     35: \L{\LB{}\Tab{8}{error (\S{}\"RT\-OPEN.RESPONSE: \%s\"\SE{}, RtErrString (rta \-\> rta\_reason));}}
                     36: \L{\LB{}}
                     37: \L{\LB{    \K{if} (RoSetService (sd, RoRtService, 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.