\File{grind6\-2.c},{22:23},{Jun 12 1988}
\L{\LB{\K{\#include} \<stdio.h\>}}
\L{\LB{\K{\#include} \<isode\/tsap.h\>}}
\L{\LB{\K{\#include} \<isode\/isoservent.h\>}}
\L{\LB{}}
\L{\LB{}}
\L{\LB{\C{}\/* ARGSUSED *\/\CE{}}}
\L{\LB{}}
\L{\LB{\Proc{main}main (argc, argv, envp)}}
\L{\LB{\K{int}}\Tab{8}{argc;}}
\L{\LB{\K{char}  **argv,}}
\L{\LB{      **envp;}}
\L{\LB{\{}}
\L{\LB{    \K{int}     result,}}
\L{\LB{}\Tab{8}{    sd;}}
\L{\LB{    \K{struct} TSAPstart    tss;}}
\L{\LB{    \K{register} \K{struct} TSAPstart  *ts = \&tss;}}
\L{\LB{    \K{struct} TSAPdata txs;}}
\L{\LB{    \K{register} \K{struct} TSAPdata  *tx = \&txs;}}
\L{\LB{    \K{struct} TSAPdisconnect   tds;}}
\L{\LB{    \K{register} \K{struct} TSAPdisconnect *td = \&tds;}}
\L{\LB{}}
\L{\LB{    \K{if} (TInit (argc, argv, ts, td) == NOTOK)}}
\L{\LB{}\Tab{8}{error (\S{}\"T\-CONNECT.INDICATION: \%s\"\SE{}, TErrString (td \-\> td\_reason));}}
\L{\LB{    sd = ts \-\> ts\_sd;}}
\L{\LB{}}
\L{\LB{\C{}\/* examine argv here, if need be *\/\CE{}}}
\L{\LB{}}
\L{\LB{    \K{if} (TConnResponse (sd, \&ts \-\> ts\_called, ts \-\> ts\_expedited,}}
\L{\LB{}\Tab{16}{ts \-\> ts\_data, ts \-\> ts\_len, NULLQOS, td) == NOTOK)}}
\L{\LB{}\Tab{8}{error (\S{}\"T\-CONNECT.RESPONSE: \%s\"\SE{}, TErrString (td \-\> td\_reason));}}
\L{\LB{}}
\L{\LB{...}}
