1: /*
   2:  * Client stubs for PasswordLookup.
   3:  */
   4: #include "PasswordLookup_support.c"
   5: 
   6: LookupUidResults
   7: LookupUid(_Connection, _BDTprocptr, uid)
   8:     CourierConnection *_Connection;
   9:     int (*_BDTprocptr)();
  10:     Cardinal uid;
  11: {
  12:     LookupUidResults _Results;
  13:     register Unspecified *_buf, *_bp;
  14:     Boolean _errorflag;
  15:     Cardinal _errtype;
  16: 
  17:     _buf = Allocate(1);
  18:     _bp = _buf;
  19:     _bp += externalize_Cardinal(&uid, _bp);
  20:     SendCallMessage(_Connection, PasswordLookup_NUMBER, PasswordLookup_VERSION, 0, 1, _buf);
  21:     Deallocate(_buf);
  22:     MaybeCallBDTHandler(_Connection, _BDTprocptr);
  23:     _bp = ReceiveReturnMessage(_Connection, &_errorflag);
  24:     _buf = _bp;
  25:     if (_errorflag) {
  26:         _bp += internalize_Cardinal(&_errtype, _bp);
  27:         switch (ERROR_OFFSET+_errtype) {
  28:         case NoSuchUser:
  29:             raise(ERROR_OFFSET+_errtype, 0);
  30:             /*NOTREACHED*/
  31:         default:
  32:             /* don't know how to unpack this */
  33:             raise(ERROR_OFFSET+_errtype, 0);
  34:             /*NOTREACHED*/
  35:         }
  36:     } else
  37:         _bp += internalize_LookupUidResults(&_Results, _bp);
  38:     Deallocate(_buf);
  39:     return (_Results);
  40: }
  41: 
  42: LookupUserResults
  43: LookupUser(_Connection, _BDTprocptr, user)
  44:     CourierConnection *_Connection;
  45:     int (*_BDTprocptr)();
  46:     String user;
  47: {
  48:     LookupUserResults _Results;
  49:     register Unspecified *_buf, *_bp;
  50:     Boolean _errorflag;
  51:     Cardinal _errtype;
  52:     register LongCardinal _n = 0;
  53: 
  54:     _n += sizeof_String(&user);
  55:     _buf = Allocate(_n);
  56:     _bp = _buf;
  57:     _bp += externalize_String(&user, _bp);
  58:     SendCallMessage(_Connection, PasswordLookup_NUMBER, PasswordLookup_VERSION, 1, _n, _buf);
  59:     Deallocate(_buf);
  60:     MaybeCallBDTHandler(_Connection, _BDTprocptr);
  61:     _bp = ReceiveReturnMessage(_Connection, &_errorflag);
  62:     _buf = _bp;
  63:     if (_errorflag) {
  64:         _bp += internalize_Cardinal(&_errtype, _bp);
  65:         switch (ERROR_OFFSET+_errtype) {
  66:         case NoSuchUser:
  67:             raise(ERROR_OFFSET+_errtype, 0);
  68:             /*NOTREACHED*/
  69:         case OtherError: {
  70:             static T_cn754_2 _result;
  71:             _bp += internalize_T_cn754_2(&_result, _bp);
  72:             raise(ERROR_OFFSET+_errtype, (char *) &_result);
  73:             /*NOTREACHED*/
  74:             }
  75:         default:
  76:             /* don't know how to unpack this */
  77:             raise(ERROR_OFFSET+_errtype, 0);
  78:             /*NOTREACHED*/
  79:         }
  80:     } else
  81:         _bp += internalize_LookupUserResults(&_Results, _bp);
  82:     Deallocate(_buf);
  83:     return (_Results);
  84: }
Last modified: 1986-03-13
Generated: 2016-12-26
Generated by src2html V0.67
page hit count: 650
Valid CSS Valid XHTML 1.0 Strict