/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: July 3, 1993 10:49:17 am PDT */
/* C2C version: April 20, 1993 (sun4) */
/* ref-counting: off */
/* file: XTkSharedCellImpl, module: XTkSharedCellImpl */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [3754073705,4216721478] XTkSharedCellImpl";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
#define SOURCE(p, l) /* source p, l */
static void NoName←Q576();
static void XTkSharedCellImpl←P0();
static void TextCellNotifier←P60();
static void TextDestructNotified←P120();
static void BindText←P180();
static void CellNotifier←P240();
static void DestructNotified←P300();
static void Unregister←P360();
static void Bind←P420();
static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\244\000\000"};
static struct {unsigned f; char r[40];} string2 = {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[16];} string3 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\104\304\000\000"};
static struct {unsigned f; char r[24];} string4 = {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];} string5 = {851984, "\257\300\337\302\236\151\300\373\126\020\106\100\214\000\000"};
static struct {unsigned f; char r[4];} string6 = {131074, "\004\013\000"};
static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\337\302\236\151\300\373\126\020\106\100\164\000\000"};
static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\363\056\063\372\300\370\055\216\126\100\150\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\236\233\335\245\300\227\327\024\271\100\150\000\000"};
static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\150\000\000"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\234\350\054\033\300\120\345\145\367\100\150\000\000"};
static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\324\362\126\122\300\221\037\267\321\100\150\000\000"};
static struct {
   word f0[11]; word f11; word f12; word f13; 
   word f14; word f15; word f16; word f17; 
   word f18; word f19; word f20; word f21; 
   word f22; word f23; word f24; word f25; 
   word f26[6]; 
   } globalframe = {
   {0}, (word) Bind←P420, 0, (word) Unregister←P360, 
   0, (word) DestructNotified←P300, 0, (word) CellNotifier←P240, 
   0, (word) BindText←P180, 0, (word) TextDestructNotified←P120, 
   0, (word) TextCellNotifier←P60, 0, (word) XTkSharedCellImpl←P0, 
   {0}
   };

static void NoName←Q576()
   {
   register ptr gf←c054 =  (ptr) &globalframe;
   word var←c13636;
   (* (( (ptr) gf←c054)+8) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (* (( (ptr) gf←c054)+9) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4);
   (* (( (ptr) gf←c054)+10) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string6);
   (void) XR←DeclareGlobalFrame((word) "XTkSharedCellImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string7)), (word) (
         ( (bPt) gf←c054)+100)/* var←c13316 */ );
   var←c13636 = (word) XR←ImportInterface((word) "SharedCell", (word) XR←GetTypeIndexS((word) (&string8)), 9);
   (* (( (ptr) gf←c054)+28)/* var←c13412 */  ) = var←c13636;
   (void) XR←ImportProcS(var←c13636, 67371777);
   (void) XR←ImportProcS(var←c13636, 67371521);
   var←c13636 = (word) XR←ImportInterface((word) "SharedCellBackdoor", (word) XR←GetTypeIndexS((word) (&string9)), 2);
   (* (( (ptr) gf←c054)+29)/* var←c13444 */  ) = var←c13636;
   (void) XR←ImportProcS(var←c13636, 786435);
   (void) XR←ImportProcS(var←c13636, 786691);
   var←c13636 = (word) XR←ImportInterface((word) "XTk", (word) XR←GetTypeIndexS((word) (&string10)), 50);
   (* (( (ptr) gf←c054)+30)/* var←c13476 */  ) = var←c13636;
   (void) XR←ImportProcS(var←c13636, 1050628);
   var←c13636 = (word) XR←ImportInterface((word) "XTkLabels", (word) XR←GetTypeIndexS((word) (&string11)), 9);
   (* (( (ptr) gf←c054)+27)/* var←c13380 */  ) = var←c13636;
   (void) XR←ImportProcS(var←c13636, 787203);
   var←c13636 = (word) XR←ExportInterface((word) "XTkSharedCell", (word) XR←GetTypeIndexS((word) (&string12)), 2);
   (* (( (ptr) gf←c054)+31)/* var←c13668 */  ) = var←c13636;
   (void) XR←ExportProcS(var←c13636, (word) (( (bPt) gf←c054)+44)/* var←c13092 */ , 1310725, (word) "Bind");
   (void) XR←ExportProcS(var←c13636, (word) (( (bPt) gf←c054)+76)/* var←c13220 */ , 524546, (word) "BindText");
   }

static void XTkSharedCellImpl←P0(formal←c018, formal←c017)
   word formal←c018;
   word formal←c017;
   {
   /* XTkSharedCellImpl: */ 
   }

static void TextCellNotifier←P60(cell←v4692, notifierData←v4720, value←v4748)
   word cell←v4692;
   word notifierData←v4720;
   word value←v4748;
   {
   register ptr gf←c13700 =  (ptr) &globalframe;
   word w←v3452;
   word text←v3480 = 0;
   /* TextCellNotifier: */ 
SOURCE(246, 205)
SOURCE(277, 36)
   w←v3452 = XR←Narrow(notifierData←v4720, (* (( (ptr) gf←c13700)+8) ));
SOURCE(338, 85)
   {
      word var←c13348;
      var←c13348 = value←v4748;
      if ((var←c13348 == 0)) {
         goto lab←L100000;
         };
      {
         word tc13;
         if (((* (( (ptr) gf←c13700)+9) ) == XR←GetReferentType(var←c13348))) {
            tc13 =  (word) ( (unsigned) (*(int*)var←c13348<0) == 0);
            }
         else {
            tc13 =  (word) 0;
            };
         if (tc13) {
            {
               word r←v3524;
               r←v3524 = var←c13348;
SOURCE(378, 8)
               text←v3480 = r←v3524;
               };
            }
         else {
            lab←L100000: ;
SOURCE(399, 24)
            if ((value←v4748 != 0)) {
SOURCE(417, 6)
               return;
               };
            };
         };
      };
SOURCE(425, 26)
   {
      word pd14;
      pd14 = (* (( (ptr) (* (( (ptr) gf←c13700)+27)/* var←c13380 */  ))+7) );
      (void) ( *( (fPt) ((*  (ptr) pd14 ))))(w←v3452, text←v3480, 2, pd14);
      };
   }

static void TextDestructNotified←P120(widget←v4808, registerData←v4836, callData←v4864, event←v4892)
   word widget←v4808;
   word registerData←v4836;
   word callData←v4864;
   word event←v4892;
   {
   register ptr gf←c13732 =  (ptr) &globalframe;
   word cell←v3568;
   /* TextDestructNotified: */ 
SOURCE(457, 177)
SOURCE(504, 59)
   {
      word pd15;
      pd15 = (* (( (ptr) (* (( (ptr) gf←c13732)+28)/* var←c13412 */  ))+6) );
      cell←v3568 = (word) ( *( (fPt) ((*  (ptr) pd15 ))))(registerData←v4836, pd15);
      };
SOURCE(565, 69)
   {
      word pd16;
      pd16 = (* (( (ptr) (* (( (ptr) gf←c13732)+29)/* var←c13444 */  ))+5) );
      (void) ( *( (fPt) ((*  (ptr) pd16 ))))(cell←v3568, (word) (( (bPt) gf←c13732)+92)/* var←c13284 */ , widget←v4808, pd16);
      };
   }

static void BindText←P180(cell←v2996, textWidget←v3024)
   word cell←v2996;
   word textWidget←v3024;
   {
   register ptr gf←c13764 =  (ptr) &globalframe;
   /* BindText: */ 
SOURCE(640, 520)
SOURCE(714, 35)
   if ((cell←v2996 == 0) || (textWidget←v3024 == 0)) {
SOURCE(749, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(756, 90)
   {
      word pd17;
      pd17 = (* (( (ptr) (* (( (ptr) gf←c13764)+30)/* var←c13476 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd17 ))))(textWidget←v3024, (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c13764)+30)/* var←c13476 */  ))+29)
          ) ), (word) (( (bPt) gf←c13764)+84)/* var←c13252 */ , cell←v2996, pd17);
      };
SOURCE(848, 101)
   if (((* (( (ptr) textWidget←v3024)+38) ) < 4)) {
SOURCE(878, 71)
      {
         word pd18;
         pd18 = (* (( (ptr) (* (( (ptr) gf←c13764)+29)/* var←c13444 */  ))+4) );
         (void) ( *( (fPt) ((*  (ptr) pd18 ))))(cell←v2996, (word) (( (bPt) gf←c13764)+92)/* var←c13284 */ , textWidget←v3024, pd18)
         ;
         };
      };
SOURCE(951, 103)
   if (((* (( (ptr) textWidget←v3024)+38) ) == 4)) {
SOURCE(981, 73)
      {
         word pd19;
         pd19 = (* (( (ptr) (* (( (ptr) gf←c13764)+29)/* var←c13444 */  ))+5) );
         (void) ( *( (fPt) ((*  (ptr) pd19 ))))(cell←v2996, (word) (( (bPt) gf←c13764)+92)/* var←c13284 */ , textWidget←v3024, pd19)
         ;
         };
      };
SOURCE(1056, 104)
   {
      word var←c13508;
      {
         word pd20;
         pd20 = (* (( (ptr) (* (( (ptr) gf←c13764)+28)/* var←c13412 */  ))+7) );
         var←c13508 = (word) ( *( (fPt) ((*  (ptr) pd20 ))))(cell←v2996, pd20);
         };
      if ((var←c13508 == 0)) {
         goto lab←L100001;
         };
      {
         word tc21;
         if (((* (( (ptr) gf←c13764)+9) ) == XR←GetReferentType(var←c13508))) {
            tc21 =  (word) ( (unsigned) (*(int*)var←c13508<0) == 0);
            }
         else {
            tc21 =  (word) 0;
            };
         if (tc21) {
            {
               word r←v3612;
               r←v3612 = var←c13508;
SOURCE(1119, 41)
               {
                  word pd22;
                  pd22 = (* (( (ptr) (* (( (ptr) gf←c13764)+27)/* var←c13380 */  ))+7) );
                  (void) ( *( (fPt) ((*  (ptr) pd22 ))))(textWidget←v3024, r←v3612, 1, pd22);
                  };
               };
            }
         else {
            lab←L100001: ;
            };
         };
      };
   }

static void CellNotifier←P240(cell←v4952, notifierData←v4980, value←v5008)
   word cell←v4952;
   word notifierData←v4980;
   word value←v5008;
   {
   register ptr gf←c13796 =  (ptr) &globalframe;
   word b←v3656;
   word w←v3684;
   /* CellNotifier: */ 
SOURCE(1305, 144)
SOURCE(1332, 37)
   b←v3656 = XR←Narrow(notifierData←v4980, (* (( (ptr) gf←c13796)+10) ));
SOURCE(1371, 24)
   w←v3684 = (*  (ptr) b←v3656 );
SOURCE(1397, 52)
   if ((w←v3684 != 0)) {
SOURCE(1411, 38)
      {
         word pd23;
         pd23 = (* (( (ptr) b←v3656)+2) );
         (void) ( *( (fPt) ((*  (ptr) pd23 ))))(w←v3684, (* (( (ptr) b←v3656)+3) ), value←v5008, 0, pd23);
         };
      };
   }

static void DestructNotified←P300(widget←v5068, registerData←v5096, callData←v5124, event←v5152)
   word widget←v5068;
   word registerData←v5096;
   word callData←v5124;
   word event←v5152;
   {
   register ptr gf←c13828 =  (ptr) &globalframe;
   /* DestructNotified: */ 
SOURCE(1455, 75)
SOURCE(1498, 32)
   {
      word var←c13540;
      var←c13540 = XR←Narrow(registerData←v5096, (* (( (ptr) gf←c13828)+10) ));
      (void) Unregister←P360(var←c13540);
      };
   }

static void Unregister←P360(b←v3228)
   word b←v3228;
   {
   register ptr gf←c13860 =  (ptr) &globalframe;
   word cell←v3740;
   /* Unregister: */ 
SOURCE(1536, 199)
SOURCE(1574, 30)
   cell←v3740 = (* (( (ptr) b←v3228)+1) );
SOURCE(1606, 77)
   if ((cell←v3740 != 0)) {
SOURCE(1623, 60)
      {
         word pd24;
         pd24 = (* (( (ptr) (* (( (ptr) gf←c13860)+29)/* var←c13444 */  ))+5) );
         (void) ( *( (fPt) ((*  (ptr) pd24 ))))(cell←v3740, (word) (( (bPt) gf←c13860)+68)/* var←c13188 */ , b←v3228, pd24);
         };
      };
SOURCE(1685, 12)
   (* (( (ptr) b←v3228)+1) ) = 0;
SOURCE(1699, 14)
   (*  (ptr) b←v3228 ) = 0;
SOURCE(1715, 20)
   (* (( (ptr) b←v3228)+3) ) = 0;
   }

static void Bind←P420(cell←v3300, widget←v3328, notifyProc←v3356, registerData←v3384, initialCall←v3412)
   word cell←v3300;
   word widget←v3328;
   word notifyProc←v3356;
   word registerData←v3384;
   word initialCall←v3412;
   {
   register ptr gf←c13892 =  (ptr) &globalframe;
   word b←v3784;
   /* Bind: */ 
SOURCE(1741, 575)
SOURCE(1879, 88)
   b←v3784 = XR←NewObject(16, (* (( (ptr) gf←c13892)+10) ));
   (*  (ptr) b←v3784 ) = widget←v3328;
   (* (( (ptr) b←v3784)+1) ) = cell←v3300;
   (* (( (ptr) b←v3784)+3) ) = registerData←v3384;
SOURCE(1969, 49)
   if (((cell←v3300 == 0) || (widget←v3328 == 0)) || (notifyProc←v3356 == 0)) {
SOURCE(2018, 5)
      (void) XR←RaiseUnnamedError();
      };
SOURCE(2025, 79)
   {
      word pd25;
      pd25 = (* (( (ptr) (* (( (ptr) gf←c13892)+30)/* var←c13476 */  ))+12) );
      (void) ( *( (fPt) ((*  (ptr) pd25 ))))(widget←v3328, (*  (ptr) (* (( (ptr) (* (( (ptr) gf←c13892)+30)/* var←c13476 */  ))+29)
          ) ), (word) (( (bPt) gf←c13892)+60)/* var←c13156 */ , b←v3784, pd25);
      };
SOURCE(2106, 84)
   if (((* (( (ptr) widget←v3328)+38) ) < 4)) {
SOURCE(2132, 58)
      {
         word pd26;
         pd26 = (* (( (ptr) (* (( (ptr) gf←c13892)+29)/* var←c13444 */  ))+4) );
         (void) ( *( (fPt) ((*  (ptr) pd26 ))))(cell←v3300, (word) (( (bPt) gf←c13892)+68)/* var←c13188 */ , b←v3784, pd26);
         };
      };
SOURCE(2192, 39)
   if (((* (( (ptr) widget←v3328)+38) ) == 4)) {
SOURCE(2218, 13)
      (void) Unregister←P360(b←v3784);
      };
SOURCE(2233, 83)
   if ((0 != initialCall←v3412)) {
SOURCE(2253, 63)
      {
         word var←c13604;
         {
            word pd27;
            pd27 = (* (( (ptr) (* (( (ptr) gf←c13892)+28)/* var←c13412 */  ))+7) );
            var←c13604 = (word) ( *( (fPt) ((*  (ptr) pd27 ))))(cell←v3300, pd27);
            };
         (void) ( *( (fPt) ((*  (ptr) notifyProc←v3356 ))))(widget←v3328, registerData←v3384, var←c13604, 0, notifyProc←v3356);
         };
      };
   }

/* file: XTkSharedCellImpl, module: XTkSharedCellImpl, compiled at: July 3, 1993 10:49:17 am PDT */ 
extern void XR←install←XTkSharedCellImpl() {
   NoName←Q576();
   }
extern void XR←run←XTkSharedCellImpl() { XR←Start(&globalframe); }