/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1992 by Xerox Corporation.  All rights reserved. */
/* time: April 21, 1992 12:41:30 pm PDT */
/* C2C version: October 16, 1990 (native) */
/* ref-counting: off */
/* file: XTkCredentialsWidgetImpl, module: XTkCredentialsWidgetImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [610968475,3335201292] XTkCredentialsWidgetImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8;
typedef struct {W8 f; word r;} W9;
typedef struct {W8 f; W8 r;} W16;
typedef struct {word f0, f1, f2;} W3;
typedef struct {W16 f; W3 r;} W19;
typedef W9 *W9Pt;
typedef struct {word f0, f1, f2, f3;} W4;
typedef W4 *W4Pt;
typedef struct {word f0, f1, f2, f3, f4, f5;} W6;
#define SOURCE(p, l) /* source p, l */
#define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) )
static void NoName←Q816();
static void XTkCredentialsWidgetImpl←P0();
static word Create←P60();
static word Contents←P120();
static void Put←P180();
static void Clear←P240();
static void Hit←P300();
static void EventProc←P360();
static word NoName←Q876();
static void PushChar←P420();
static void NoName←Q936();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\104\304\000\000"};
static struct {unsigned f; char r[24];} string2 = {1376277, "\007\000\001\002\007\020\001\002\000\007\036\002\004\003\002\004\014\016\015\003\001\000\000"};
static struct {unsigned f; char r[16];} string3 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string4 = {65537, "\001\000\000"};
static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\244\000\000"};
static struct {unsigned f; char r[40];} string6 = {2555943, "\011\000\004\106\000\040\006\011\020\004\101\201\100\174\001\100\200\001\100\204\001\100\210\001\100\220\001\100\264\001\100\270\001\100\274\001\100\304\001"};
static struct {unsigned f; char r[8];} string7 = {458760, "*******"};
static struct {unsigned f; char r[12];} string8 = {524300, "xxxxxxxx\000\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\044\152\243\233\300\306\313\042\014\100\164\000\000"};
static struct {unsigned f; char r[8];} string10 = {262148, "\004\200a\000\000\000\000"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\100\164\000\000"};
static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\072\360\036\365\300\334\030\146\334\100\150\000\000"};
static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\150\000\000"};
static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\116\324\147\077\300\024\110\066\207\100\150\000\000"};
static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\241\212\365\147\300\210\002\141\100\100\150\000\000"};
static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\234\350\054\033\300\120\345\145\367\100\150\000\000"};
static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\070\155\216\025\300\046\334\372\272\100\150\000\000"};
static struct {
   word f0[15]; word f15; word f16; word f17; 
   word f18; word f19; word f20; word f21; 
   word f22; word f23; word f24; word f25; 
   word f26; word f27; word f28; word f29; 
   word f30; word f31; word f32; word f33[10]; 
   } globalframe = {
   {0}, (word) PushChar←P420, 0, (word) EventProc←P360, 
   0, (word) Hit←P300, 0, (word) Clear←P240, 
   0, (word) Put←P180, 0, (word) Contents←P120, 
   0, (word) Create←P60, 0, (word) XTkCredentialsWidgetImpl←P0, 
   0, 4294967295, 4294967295, {0}
   };

static void NoName←Q816()
   {
   register ptr gf←c071 =  (ptr) &globalframe;
   word var←c19216;
   (* (( (ptr) gf←c071)+9) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c071)+10) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (* (( (ptr) gf←c071)+11) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string6);
   (*  (ptr) (( (bPt) gf←c071)+52) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c071)+10) ), (word) &string7);
   (*  (ptr) (( (bPt) gf←c071)+56) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c071)+10) ), (word) &string8);
   (void) XR←DeclareGlobalFrame((word) "XTkCredentialsWidgetImpl", &globalframe, (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10)
      , (word) (( (bPt) gf←c071)+116)/* var←c18608 */ );
   var←c19216 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string11)), 43);
   (* (( (ptr) gf←c071)+38)/* var←c18896 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 67379457);
   (void) XR←ImportProcS(var←c19216, 67633666);
   (void) XR←ImportProcS(var←c19216, 67898627);
   (void) XR←ImportProcS(var←c19216, 67373569);
   (void) XR←ImportProcS(var←c19216, 67373313);
   (void) XR←ImportProcS(var←c19216, 67896323);
   var←c19216 = (word) XR←ImportInterface((word) "Xl", (word) XR←GetTypeIndexS((word) (&string12)), 218);
   (* (( (ptr) gf←c071)+35)/* var←c18704 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 67397633);
   (void) XR←ImportProcS(var←c19216, 67910403);
   (void) XR←ImportProcS(var←c19216, 68207876);
   var←c19216 = (word) XR←ImportInterface((word) "XlAscii", (word) XR←GetTypeIndexS((word) (&string13)), 3);
   (* (( (ptr) gf←c071)+41)/* var←c19088 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 269484036);
   var←c19216 = (word) XR←ImportInterface((word) "XTk", (word) XR←GetTypeIndexS((word) (&string14)), 50);
   (* (( (ptr) gf←c071)+37)/* var←c18832 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 788227);
   (void) XR←ImportProcS(var←c19216, 67634690);
   (void) XR←ImportProcS(var←c19216, 1579523);
   var←c19216 = (word) XR←ImportInterface((word) "XTkButtons", (word) XR←GetTypeIndexS((word) (&string15)), 5);
   (* (( (ptr) gf←c071)+36)/* var←c18736 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 72089608);
   var←c19216 = (word) XR←ImportInterface((word) "XTkInputFocus", (word) XR←GetTypeIndexS((word) (&string16)), 7);
   (* (( (ptr) gf←c071)+40)/* var←c19024 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 524290);
   var←c19216 = (word) XR←ImportInterface((word) "XTkLabels", (word) XR←GetTypeIndexS((word) (&string17)), 9);
   (* (( (ptr) gf←c071)+39)/* var←c18928 */  ) = var←c19216;
   (void) XR←ImportProcS(var←c19216, 787203);
   var←c19216 = (word) XR←ExportInterface((word) "XTkCredentialsWidget", (word) XR←GetTypeIndexS((word) (&string18)), 3);
   (* (( (ptr) gf←c071)+42)/* var←c19248 */  ) = var←c19216;
   (void) XR←ExportProcS(var←c19216, (word) (( (bPt) gf←c071)+108)/* var←c18576 */ , 69468161);
   (void) XR←ExportProcS(var←c19216, (word) (( (bPt) gf←c071)+100)/* var←c18544 */ , 67371265);
   (void) XR←ExportProcS(var←c19216, (word) (( (bPt) gf←c071)+84)/* var←c18480 */ , 262657);
   }

static void XTkCredentialsWidgetImpl←P0(formal←c025, formal←c024)
   word formal←c025;
   word formal←c024;
   {
   register ptr gf←c19280 =  (ptr) &globalframe;
   /* XTkCredentialsWidgetImpl: */ 
SOURCE(105, 2185)
   /* moved to installation proc */ 
   /* moved to installation proc */ 
SOURCE(387, 55)
   {
      word pd19;
      pd19 = (* (( (ptr) (* (( (ptr) gf←c19280)+35)/* var←c18704 */  ))+201) );
      (* (( (ptr) gf←c19280)+8)/* events←v2972 */  ) = (word) ( *( (fPt) ((*  (ptr) pd19 ))))(2, 35, 35, 35, pd19);
      };
   }

static word Create←P60(widgetSpec←v3248)
   W9 widgetSpec←v3248;
   {
   register ptr gf←c19312 =  (ptr) &globalframe;
   word w←v3292;
   /* Create: */ 
SOURCE(445, 272)
SOURCE(445, 272)
   w←v3292 = 0;
SOURCE(527, 82)
   {
      W19 var←c028;
      (*  (W9Pt) (word) &var←c028 ) = widgetSpec←v3248;
      (* (( (ptr) (word) &var←c028) + 9) ) = (* (( (ptr) gf←c19312)+14) );
      (*  (W4Pt) (( (ptr) (word) &var←c028) + 10) ) = (*  (W4Pt) (( (ptr) gf←c19312)+31)/* var←c18672 */  );
      (* (( (ptr) (word) &var←c028) + 14) ) = (word) (( (bPt) gf←c19312)+76)/* var←c18448 */ ;
      (* (( (ptr) (word) &var←c028) + 15) ) = 0;
      (* (( (ptr) (word) &var←c028) + 16) ) = 0;
      (* (( (ptr) (word) &var←c028) + 17) ) = 0;
      (* (( (ptr) (word) &var←c028) + 18) ) = 0;
      {
         word pd20;
         pd20 = (* (( (ptr) (* (( (ptr) gf←c19312)+36)/* var←c18736 */  ))+4) );
         w←v3292 = (word) ( *( (fPt) ((*  (ptr) pd20 ))))((word) (&var←c028), pd20);
         };
      };
SOURCE(611, 106)
   {
      word var←c18768;
      {
         word pd21;
         pd21 = (* (( (ptr) (* (( (ptr) gf←c19312)+35)/* var←c18704 */  ))+63) );
         var←c18768 = (word) ( *( (fPt) ((*  (ptr) pd21 ))))(0, 0, 0, pd21);
         };
      {
         W4 var←c18800;
         var←c18800.f0 = (word) (( (bPt) gf←c19312)+68)/* var←c18416 */ ;
         var←c18800.f1 = (* (( (ptr) gf←c19312)+8)/* events←v2972 */  );
         var←c18800.f2 = var←c18768;
         var←c18800.f3 = w←v3292;
         {
            word pd22;
            pd22 = (* (( (ptr) (* (( (ptr) gf←c19312)+37)/* var←c18832 */  ))+30) );
            (void) ( *( (fPt) ((*  (ptr) pd22 ))))(w←v3292, var←c18800, 1, pd22);
            };
         };
      };
SOURCE(445, 272)
   return(w←v3292);
   }

static word Contents←P120(w←v3352)
   word w←v3352;
   {
   register ptr gf←c19344 =  (ptr) &globalframe;
   word var←c3396;
   /* Contents: */ 
SOURCE(723, 162)
SOURCE(785, 100)
   {
      word var←c18864;
      {
         word pd23;
         pd23 = (* (( (ptr) (* (( (ptr) gf←c19344)+37)/* var←c18832 */  ))+10) );
         var←c18864 = (word) ( *( (fPt) ((*  (ptr) pd23 ))))(w←v3352, (* (( (ptr) gf←c19344)+14) ), pd23);
         };
      if ((var←c18864 == 0)) {
         goto lab←L100000;
         };
      {
         word tc24;
         if (((* (( (ptr) gf←c19344)+9) ) == XR←GetReferentType(var←c18864))) {
            tc24 =  (word) ((*(int*)var←c18864<0) == 0);
            }
         else {
            tc24 =  (word) 0;
            };
         if (tc24) {
            {
               word r←v3660;
               r←v3660 = var←c18864;
SOURCE(850, 10)
               return(r←v3660);
               };
            }
         else {
            lab←L100000: ;
SOURCE(873, 12)
            return(0);
            };
         };
      };
   }

static void Put←P180(w←v3456, contents←v3484)
   word w←v3456;
   word contents←v3484;
   {
   register ptr gf←c19376 =  (ptr) &globalframe;
   word old←v3704;
   /* Put: */ 
SOURCE(891, 261)
SOURCE(942, 28)
   old←v3704 = (word) Contents←P120(w←v3456);
SOURCE(972, 41)
   {
      word pd25;
      pd25 = (* (( (ptr) (* (( (ptr) gf←c19376)+37)/* var←c18832 */  ))+11) );
      (void) ( *( (fPt) ((*  (ptr) pd25 ))))(w←v3456, (* (( (ptr) gf←c19376)+14) ), contents←v3484, pd25);
      };
SOURCE(1015, 137)
   {
      word pd26;
      pd26 = (* (( (ptr) (* (( (ptr) gf←c19376)+38)/* var←c18896 */  ))+8) );
      if ((0 == (word) ( *( (fPt) ((*  (ptr) pd26 ))))(old←v3704, contents←v3484, 1, pd26))) {
SOURCE(1052, 100)
         {
            word pd27;
            pd27 = (* (( (ptr) (* (( (ptr) gf←c19376)+38)/* var←c18896 */  ))+13) );
            if ((0 != (word) ( *( (fPt) ((*  (ptr) pd27 ))))(contents←v3484, pd27))) {
SOURCE(1084, 37)
               {
                  word pd28;
                  pd28 = (* (( (ptr) (* (( (ptr) gf←c19376)+39)/* var←c18928 */  ))+7) );
                  (void) ( *( (fPt) ((*  (ptr) pd28 ))))(w←v3456, (* (( (ptr) gf←c19376)+14) ), 2, pd28);
                  };
               }
            else {
SOURCE(1121, 31)
               {
                  word pd29;
                  pd29 = (* (( (ptr) (* (( (ptr) gf←c19376)+39)/* var←c18928 */  ))+7) );
                  (void) ( *( (fPt) ((*  (ptr) pd29 ))))(w←v3456, (* (( (ptr) gf←c19376)+13) ), 2, pd29);
                  };
               };
            };
         };
      };
   }

static void Clear←P240(w←v3544)
   word w←v3544;
   {
   /* Clear: */ 
SOURCE(1159, 50)
SOURCE(1198, 11)
   (void) Put←P180(w←v3544, 0);
   }

static void Hit←P300(widget←v8968, registerData←v8996, callData←v9024, event←v9052)
   word widget←v8968;
   word registerData←v8996;
   word callData←v9024;
   word event←v9052;
   {
   register ptr gf←c19408 =  (ptr) &globalframe;
   /* Hit: */ 
SOURCE(1214, 257)
SOURCE(1244, 227)
   {
      word var←c18960;
      var←c18960 = event←v9052;
      if ((var←c18960 == 0)) {
         goto lab←L100001;
         };
      if (((* (( (ptr) var←c18960)+4) ) == 5)) {
         {
            word br←v3748;
            br←v3748 = var←c18960;
SOURCE(1296, 177)
            {
               word pm←v3792;
SOURCE(1298, 63)
               {
                  word pd30;
                  pd30 = (* (( (ptr) (* (( (ptr) gf←c19408)+35)/* var←c18704 */  ))+108) );
                  pm←v3792 = (word) ( *( (fPt) ((*  (ptr) pd30 ))))((* ((( (ptr) widget←v8968)+34)) ), pd30);
                  };
SOURCE(1363, 47)
               {
                  word var←c18992;
                  {
                     word idx31;
                     word limit32;
                     var←c18992 = (* ((( (ptr) pm←v3792)+1)+(
                           idx31 = (* (( (ptr) br←v3748)+5) ),
                           limit32 = (*  (ptr) pm←v3792 ),
                           BCK(idx31, limit32)
                           )) );
                     };
                  if ((var←c18992 == 1)) {
SOURCE(1394, 16)
                     (void) Put←P180(widget←v8968, 0);
                     };
                  };
SOURCE(1427, 44)
               {
                  word pd33;
                  pd33 = (* (( (ptr) (* (( (ptr) gf←c19408)+40)/* var←c19024 */  ))+4) );
                  (void) ( *( (fPt) ((*  (ptr) pd33 ))))(widget←v8968, (* (( (ptr) br←v3748)+7) ), pd33);
                  };
               };
            };
         }
      else {
         lab←L100001: ;
         };
      };
   }

static void EventProc←P360(formal←c084, formal←c085, tq←v9168)
   word formal←c084;
   word formal←c085;
   word tq←v9168;
   {
   W6 var←c19440;
   /* declaration of event←v9112 skipped */ 
   /* declaration of clientData←v9140 skipped */ 
   var←c19440.f4/* event←v9112 */  = formal←c084;
   var←c19440.f5/* clientData←v9140 */  = formal←c085;
   /* EventProc: */ 
SOURCE(1495, 462)
SOURCE(1525, 432)
SOURCE(1527, 392)
   {
      word var←c01;
      {
         word var←c081;
         var←c081 = (word) &var←c19440;
         var←c01 = (word) XR←Enable(( ((word)  (fPt) NoName←Q876) ), ( ((word)  (fPt) NoName←Q936) ), var←c081);
         };
      if ((var←c01 == 2)) {
         goto lab←L100002;
         }
      else {
         if ((var←c01 == 1)) {
            goto lab←L02;
            };
         };
      };
   goto lab←L100006;
   lab←L100002: ;
   lab←L100006: ;
   lab←L02: ;
   return;
   }

static word NoName←Q876(formal←c078)
   word formal←c078;
   {
   register ptr gf←c077 =  (ptr) &globalframe;
SOURCE(1563, 39)
   {
      word widget←v3836;
SOURCE(1563, 39)
      widget←v3836 = XR←Narrow((* (( (ptr) formal←c078)+5) ), (* (( (ptr) gf←c077)+11) ));
SOURCE(1604, 315)
      {
         word var←c19056;
         var←c19056 = (* (( (ptr) formal←c078)+4) );
         if ((var←c19056 == 0)) {
            goto lab←L100005;
            };
         if (((* (( (ptr) var←c19056)+4) ) == 2)) {
            {
               word keyPress←v3880;
               keyPress←v3880 = var←c19056;
SOURCE(1657, 264)
               {
                  word char←v3924;
                  word keysym←v3952;
                  word matched←v3980;
                  word isModifier←v4008;
SOURCE(1728, 140)
                  {
                     W4 var←c19120;
                     {
                        word pd34;
                        pd34 = (* (( (ptr) (* (( (ptr) gf←c077)+41)/* var←c19088 */  ))+4) );
                        (void) ( *( (fPt) ((*  (ptr) pd34 ))))((word) &var←c19120, (* (( (ptr) (* (( (ptr) formal←c078)+4) ))+2) ), (* (( (ptr) keyPress←v3880)+5)
                            ), (* (( (ptr) keyPress←v3880)+15) ), 0, pd34);
                        };
                     isModifier←v4008 = var←c19120.f3;
                     matched←v3980 = var←c19120.f2;
                     keysym←v3952 = var←c19120.f1;
                     char←v3924 = var←c19120.f0;
                     };
SOURCE(1870, 25)
                  if ((0 != isModifier←v4008)) {
SOURCE(1889, 6)
                     return(1);
                     };
SOURCE(1897, 22)
                  (void) PushChar←P420(widget←v3836, char←v3924);
                  };
               };
            }
         else {
            lab←L100005: ;
            };
         };
      };
   return(0);
   }

static void PushChar←P420(widget←v3604, ch←v3632)
   word widget←v3604;
   word ch←v3632;
   {
   register ptr gf←c19472 =  (ptr) &globalframe;
   word text←v4052;
   /* PushChar: */ 
SOURCE(1961, 329)
SOURCE(2011, 34)
   text←v4052 = (word) Contents←P120(widget←v3604);
SOURCE(2047, 221)
   {
      word var←c19152;
      var←c19152 = ch←v3632;
      switch (var←c19152) {
         case 4: case 10: case 13: case 127: 
SOURCE(2100, 10)
            text←v4052 = 0;
            break;
         case 8: 
SOURCE(2125, 85)
            {
               word leng←v4096;
SOURCE(2127, 29)
               {
                  word pd35;
                  pd35 = (* (( (ptr) (* (( (ptr) gf←c19472)+38)/* var←c18896 */  ))+14) );
                  leng←v4096 = (word) ( *( (fPt) ((*  (ptr) pd35 ))))(text←v4052, pd35);
                  };
SOURCE(2158, 50)
               if (( (int)leng←v4096 >  (int)0)) {
SOURCE(2173, 35)
                  {
                     word pd36;
                     pd36 = (* (( (ptr) (* (( (ptr) gf←c19472)+38)/* var←c18896 */  ))+17) );
                     text←v4052 = (word) ( *( (fPt) ((*  (ptr) pd36 ))))(text←v4052, 0, (leng←v4096 - 1), pd36);
                     };
                  };
               };
            break;
         default: 
SOURCE(2225, 43)
            {
               word var←c19184;
               {
                  word pd37;
                  pd37 = (* (( (ptr) (* (( (ptr) gf←c19472)+38)/* var←c18896 */  ))+37) );
                  var←c19184 = (word) ( *( (fPt) ((*  (ptr) pd37 ))))(ch←v3632, pd37);
                  };
               {
                  word pd38;
                  pd38 = (* (( (ptr) (* (( (ptr) gf←c19472)+38)/* var←c18896 */  ))+6) );
                  text←v4052 = (word) ( *( (fPt) ((*  (ptr) pd38 ))))(text←v4052, var←c19184, pd38);
                  };
               };
            break;
         };
      };
SOURCE(2273, 17)
   (void) Put←P180(widget←v3604, text←v4052);
   }

static void NoName←Q936(formal←c070, formal←c200000, formal←c200001, formal←c200002, formal←c200003)
   word formal←c070;
   word formal←c200000;
   word formal←c200001;
   word formal←c200002;
   word formal←c200003;
   {
   register ptr gf←c080 =  (ptr) &globalframe;
   if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c080)+35)/* var←c18704 */  ))+4) ))) {
      {
         word err←v13880;
         err←v13880 = (*  (ptr) formal←c200003 );
SOURCE(1549, 9)
         (*  (ptr) formal←c070 ) = 2;
         (* (( (ptr) formal←c070)+1) ) = 2;
         return;
         };
      };
   (*  (ptr) formal←c070 ) = 0;
   (* (( (ptr) formal←c070)+1) ) = 0;
   return;
   }

/* file: XTkCredentialsWidgetImpl, module: XTkCredentialsWidgetImpl, compiled at: April 21, 1992 12:41:29 pm PDT */ 
extern void XR←install←XTkCredentialsWidgetImpl() {
   NoName←Q816();
   }
extern void XR←run←XTkCredentialsWidgetImpl() { XR←Start(&globalframe); }