/* Generated with C2C (Cedar To C)*/
/* Copyright (C) 1993 by Xerox Corporation.  All rights reserved. */
/* time: March 23, 1993 2:36:47 pm PST */
/* C2C version: February 24, 1993 (sun4) */
/* ref-counting: off */
/* file: XlShmCommands, module: XlShmCommands */ 
/* switches: bcfhklnouw */ 
#include <cedar/InstallationSupport.h>
#include <cedar/CedarExtra.h>
static char versionStamp[] = "@(#)mob←version [1226798498,2463522035] XlShmCommands";
typedef unsigned word, *ptr;
typedef unsigned char byte, *bPt;
typedef unsigned short half, *hPt;
typedef word (*fPt)();
typedef struct {word f0, f1, f2;} W3;
typedef struct {word f0, f1;} W2;
#define SOURCE(p, l) /* source p, l */
static void NoName←Q180();
static void XlShmCommands←P0();
static void ShmUsage←P60();
static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"};
static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"};
static struct {unsigned f; char r[32];} string3 = {1835040, "Query usage of shared memory\000\000\000"};
static struct {unsigned f; char r[32];} string4 = {1835040, "addr: %g, bytes: %g, id: %g\012\000\000\000"};
static struct {unsigned f; char r[20];} string5 = {1048596, "bytes total: %g\012\000\000\000"};
static struct {unsigned f; char r[12];} string6 = {720908, "X11ShmUsage"};
static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\111\037\165\242\300\222\326\134\363\100\164\000\000"};
static struct {unsigned f; char r[8];} string8 = {262148, "\004\200x\000\000\000\000"};
static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\373\225\000\071\300\362\156\307\320\100\150\000\000"};
static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"};
static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\361\330\262\307\300\017\351\022\161\100\150\000\000"};
static struct {
   word f0[15]; word f15; word f16; word f17; 
   word f18[4]; 
   } globalframe = {
   {0}, (word) ShmUsage←P60, 0, (word) XlShmCommands←P0, 
   {0}
   };

static void NoName←Q180()
   {
   register ptr gf←c027 =  (ptr) &globalframe;
   word var←c8124;
   (* (( (ptr) gf←c027)+9) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2);
   (*  (ptr) (( (bPt) gf←c027)+44) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c027)+9) ), (word) &string3);
   (*  (ptr) (( (bPt) gf←c027)+48) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c027)+9) ), (word) &string4);
   (*  (ptr) (( (bPt) gf←c027)+52) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c027)+9) ), (word) &string5);
   (*  (ptr) (( (bPt) gf←c027)+56) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c027)+9) ), (word) &string6);
   (void) XR←DeclareGlobalFrame((word) "XlShmCommands", &globalframe, (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8)
      , (word) (( (bPt) gf←c027)+68)/* var←c7836 */ );
   var←c8124 = (word) XR←ImportInterface((word) "Commander", (word) XR←GetTypeIndexS((word) (&string9)), 3);
   (* (( (ptr) gf←c027)+19)/* var←c7868 */  ) = var←c8124;
   (void) XR←ImportProcS(var←c8124, 1310725);
   var←c8124 = (word) XR←ImportInterface((word) "IO", (word) XR←GetTypeIndexS((word) (&string10)), 103);
   (* (( (ptr) gf←c027)+21)/* var←c8060 */  ) = var←c8124;
   (void) XR←ImportProcS(var←c8124, 1063171);
   (void) XR←ImportProcS(var←c8124, 2111493);
   var←c8124 = (word) XR←ImportInterface((word) "XlShmMonitor", (word) XR←GetTypeIndexS((word) (&string11)), 2);
   (* (( (ptr) gf←c027)+20)/* var←c7900 */  ) = var←c8124;
   (void) XR←ImportProcS(var←c8124, 201588993);
   (void) XR←ImportProcS(var←c8124, 67371009);
   }

static void XlShmCommands←P0(formal←c011, formal←c010)
   word formal←c011;
   word formal←c010;
   {
   register ptr gf←c8156 =  (ptr) &globalframe;
   /* XlShmCommands: */ 
SOURCE(46, 548)
SOURCE(519, 75)
   {
      word pd12;
      pd12 = (* (( (ptr) (* (( (ptr) gf←c8156)+19)/* var←c7868 */  ))+4) );
      (void) ( *( (fPt) ((*  (ptr) pd12 ))))((* (( (ptr) gf←c8156)+14) ), (word) (( (bPt) gf←c8156)+60)/* var←c7804 */ , (* (( (ptr) gf←c8156)+11)
          ), 0, 1, pd12);
      };
   }

static void ShmUsage←P60(formal←c026, cmd←v3384)
   word formal←c026;
   word cmd←v3384;
   {
   register ptr gf←c8188 =  (ptr) &globalframe;
   word result←v3428;
   word msg←v3456;
   word total←v2656 = 0;
   word addr←v2684;
   word bytes←v2712;
   word id←v2740;
   word seg←v2768;
   /* ShmUsage: */ 
SOURCE(120, 393)
SOURCE(120, 393)
   result←v3428 = 0;
SOURCE(120, 393)
   msg←v3456 = 0;
SOURCE(208, 30)
   {
      word pd13;
      pd13 = (* (( (ptr) (* (( (ptr) gf←c8188)+20)/* var←c7900 */  ))+4) );
      seg←v2768 = (word) ( *( (fPt) ((*  (ptr) pd13 ))))(0, pd13);
      };
SOURCE(241, 206)
   lab←L100003: ;
   if ((seg←v2768 != 0)) {
      }
   else {
      goto lab←L100001;
      };
SOURCE(258, 42)
   {
      W3 var←c7932;
      {
         word pd14;
         pd14 = (* (( (ptr) (* (( (ptr) gf←c8188)+20)/* var←c7900 */  ))+5) );
         (void) ( *( (fPt) ((*  (ptr) pd14 ))))((word) &var←c7932, seg←v2768, pd14);
         };
      id←v2740 = var←c7932.f2;
      bytes←v2712 = var←c7932.f1;
      addr←v2684 = var←c7932.f0;
      };
SOURCE(303, 19)
   total←v2656 = (total←v2656 + bytes←v2712);
SOURCE(324, 93)
   {
      W2 var←c7964;
      W2 var←c7996;
      W2 var←c8028;
      var←c7964.f0 = 4;
      var←c7964.f1 = addr←v2684;
      var←c7996.f0 = 4;
      var←c7996.f1 = bytes←v2712;
      var←c8028.f0 = 4;
      var←c8028.f1 = id←v2740;
      {
         word pd15;
         pd15 = (* (( (ptr) (* (( (ptr) gf←c8188)+21)/* var←c8060 */  ))+60) );
         (void) ( *( (fPt) ((*  (ptr) pd15 ))))((* (( (ptr) cmd←v3384)+1) ), (* (( (ptr) gf←c8188)+12) ), var←c7964, var←c7996, var←c8028, pd15)
         ;
         };
      };
SOURCE(419, 28)
   {
      word pd16;
      pd16 = (* (( (ptr) (* (( (ptr) gf←c8188)+20)/* var←c7900 */  ))+4) );
      seg←v2768 = (word) ( *( (fPt) ((*  (ptr) pd16 ))))(seg←v2768, pd16);
      };
   goto lab←L100003;
   lab←L100001: ;
SOURCE(459, 54)
   {
      W2 var←c8092;
      var←c8092.f0 = 4;
      var←c8092.f1 = total←v2656;
      {
         word pd17;
         pd17 = (* (( (ptr) (* (( (ptr) gf←c8188)+21)/* var←c8060 */  ))+61) );
         (void) ( *( (fPt) ((*  (ptr) pd17 ))))((* (( (ptr) cmd←v3384)+1) ), (* (( (ptr) gf←c8188)+13) ), var←c8092, pd17);
         };
      };
   /* removed tail goto */ 
   (*  (ptr) formal←c026 ) = result←v3428;
   (* (( (ptr) formal←c026)+1) ) = msg←v3456;
   return;
   }

/* file: XlShmCommands, module: XlShmCommands, compiled at: March 23, 1993 2:36:46 pm PST */ 
extern void XR←install←XlShmCommands() {
   NoName←Q180();
   }
extern void XR←run←XlShmCommands() { XR←Start(&globalframe); }