home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / RPCSMP.ZIP / rgc.c < prev    next >
Text File  |  1992-12-10  |  760b  |  29 lines

  1. #include <rpc/rpc.h>
  2. #include <time.h>
  3. #include <string.h>
  4. #include "rg.h"
  5.  
  6. static struct timeval TIMEOUT = { 25, 0 };
  7.  
  8. int *
  9. printmessage_1(char **argp, CLIENT *clnt)
  10. {
  11.         static int res;
  12.         char * _Seg16 pch16;
  13.  
  14.         pch16=*argp;
  15.         bzero(&res, sizeof(res));
  16.         if (clnt_call(clnt, PRINTMESSAGE, xdr_wrapstring, pch16,
  17.  
  18. // note! The 4th argument to the clnt_call macro is a _Seg16 pointer to
  19. // a _Seg16 pointer.  It would not do to pass argp.  The compiler would
  20. // convert argp to a _Seg16 pointer to an 0:32 pointer, which is the
  21. // best it can do -- but this will trap in the 16 bit DLL.
  22.  
  23.           xdr_int, &res, TIMEOUT) != RPC_SUCCESS) {
  24.                 res=-99;
  25.         }
  26.         return (&res);
  27. }
  28.  
  29.