|
|
1.1 root 1: \File{grindB\-2.c},{22:23},{Jun 12 1988}
2: \L{\LB{\K{\#include} \<stdio.h\>}}
3: \L{\LB{\K{\#include} \S{}\"generic.h\"\SE{}}\Tab{32}{\C{}\/* defines OPERATIONS and ERRORS *\/\CE{}}}
4: \L{\LB{\K{\#include} \<isode\/rosap.h\>}}
5: \L{\LB{\K{\#include} \<isode\/isoservent.h\>}}
6: \L{\LB{}}
7: \L{\LB{}}
8: \L{\LB{\K{int}}\Tab{8}{ros\_indications ();}}
9: \L{\LB{}}
10: \L{\LB{}}
11: \L{\LB{\Proc{main}main (argc, argv, envp)}}
12: \L{\LB{\K{int}}\Tab{8}{argc;}}
13: \L{\LB{\K{char} **argv,}}
14: \L{\LB{ **envp;}}
15: \L{\LB{\{}}
16: \L{\LB{ \K{int}}\Tab{8}{ result,}}
17: \L{\LB{}\Tab{8}{ sd;}}
18: \L{\LB{ \K{struct} RoSAPstart ross;}}
19: \L{\LB{ \K{register} \K{struct} RoSAPstart *ros = \&ross;}}
20: \L{\LB{ \K{struct} RoSAPindication rois;}}
21: \L{\LB{ \K{register} \K{struct} RoSAPindication *roi = \&rois;}}
22: \L{\LB{ \K{register} \K{struct} RoSAPpreject *rop = \&roi \-\> roi\_preject;}}
23: \L{\LB{}}
24: \L{\LB{ \K{if} (RoInit (argc, argv, ros, roi) == NOTOK)}}
25: \L{\LB{}\Tab{8}{error (\S{}\"initialization fails: \%s\"\SE{}, RoErrString (rop \-\> rop\_reason));}}
26: \L{\LB{}}
27: \L{\LB{ sd = ros \-\> ros\_sd;}}
28: \L{\LB{\C{}\/* do authentication using ros \-\> ros\_data here... *\/\CE{}}}
29: \L{\LB{ ROSFREE (ros);}}
30: \L{\LB{ }}
31: \L{\LB{\C{}\/* read command line arguments here... *\/\CE{}}}
32: \L{\LB{}}
33: \L{\LB{\C{}\/* could use ROS\_VALIDATE or ROS\_BUSY instead and then exit *\/\CE{}}}
34: \L{\LB{}}
35: \L{\LB{ \K{if} (RoBeginResponse (sd, ROS\_ACCEPT, NULLPE, roi) == NOTOK)}}
36: \L{\LB{}\Tab{8}{error (\S{}\"RO\-BEGIN.RESPONSE: \%s\"\SE{}, RoErrString (rop \-\> rop\_reason));}}
37: \L{\LB{}}
38: \L{\LB{ \K{if} (RoSetIndications (sd, ros\_indication, roi) == NOTOK)}}
39: \L{\LB{}\Tab{8}{error (\S{}\"RoSetIndications: \%s\"\SE{}, RoErrString (rop \-\> rop\_reason));}}
40: \L{\LB{}}
41: \L{\LB{ \K{for} (;;)}}
42: \L{\LB{}\Tab{8}{pause ();}}
43: \L{\LB{\}}}
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.