/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: August 16, 1993 12:26:13 pm PDT */ /* C2C version: April 20, 1993 (sun4) */ /* ref-counting: off */ /* file: X11ViewersGCHackImpl, module: X11ViewersGCHackImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [1447419778,2163387696] X11ViewersGCHackImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; typedef struct {word f0, f1;} W2; typedef word (*fPt)(); #define SOURCE(p, l) /* source p, l */ static void NoName←Q468(); static void X11ViewersGCHackImpl←P0(); static void BeforeGarbageCollection←P60(); static void AfterGarbageCollection←P120(); static word WaitForRequest←P180(); static void CursorChangeProcess←P240(); static word NoName←Q528(); static void Protected←P360(); static void Init←P300(); static void NoName←Q588(); static word NoName←Q648(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\126\105\337\202\300\200\362\255\060\100\164\000\000"}; static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\222\112\165\150\300\015\105\213\112\100\150\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\275\320\070\317\300\004\110\363\366\100\150\000\000"}; static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\251\206\104\055\300\374\254\024\121\100\150\000\000"}; static struct { word f0[22]; word f22; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33[5]; } globalframe = { {0}, (word) Init←P300, 0, (word) CursorChangeProcess←P240, 0, (word) WaitForRequest←P180, 0, (word) AfterGarbageCollection←P120, 0, (word) BeforeGarbageCollection←P60, 0, (word) X11ViewersGCHackImpl←P0, {0} }; static void NoName←Q468() { register ptr gf←c038 = (ptr) &globalframe; word var←c5320; (void) XR←DeclareGlobalFrame((word) "X11ViewersGCHackImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string1)), (word) ( ( (bPt) gf←c038)+128)/* var←c5064 */ ); var←c5320 = (word) XR←ImportInterface((word) "GCCallBack", (word) XR←GetTypeIndexS((word) (&string2)), 2); (* (( (ptr) gf←c038)+37)/* var←c5288 */ ) = var←c5320; (void) XR←ImportProcS(var←c5320, 524290); (void) XR←ImportProcS(var←c5320, 524546); var←c5320 = (word) XR←ImportInterface((word) "Process", (word) XR←GetTypeIndexS((word) (&string3)), 22); (* (( (ptr) gf←c038)+34)/* var←c5128 */ ) = var←c5320; (void) XR←ImportProcS(var←c5320, 526081); (void) XR←ImportProcS(var←c5320, 67371521); (void) XR←ImportProcS(var←c5320, 525570); (void) XR←ImportProcS(var←c5320, 266753); (void) XR←ImportProcS(var←c5320, 264449); var←c5320 = (word) XR←ImportInterface((word) "RuntimeError", (word) XR←GetTypeIndexS((word) (&string4)), 27); (* (( (ptr) gf←c038)+35)/* var←c5160 */ ) = var←c5320; var←c5320 = (word) XR←ImportInterface((word) "X11Viewers", (word) XR←GetTypeIndexS((word) (&string5)), 8); (* (( (ptr) gf←c038)+36)/* var←c5192 */ ) = var←c5320; (void) XR←ImportProcS(var←c5320, 263937); } static void X11ViewersGCHackImpl←P0(formal←c019, formal←c018) word formal←c019; word formal←c018; { /* X11ViewersGCHackImpl: */ SOURCE(59, 1372) SOURCE(1425, 6) (void) Init←P300(); } static void BeforeGarbageCollection←P60(x←v2940) word x←v2940; { register ptr gf←c5352 = (ptr) &globalframe; /* BeforeGarbageCollection: */ SOURCE(310, 156) (void) (XR←MonitorEntry((word) (( (bPt) gf←c5352)+16)/* LOCK←v2608 */ )); SOURCE(359, 25) (* (( (ptr) gf←c5352)+9)/* gcCursorSwitchToIt←v2664 */ ) = 1; SOURCE(386, 26) (* (( (ptr) gf←c5352)+8)/* gcCursorNeedsChange←v2636 */ ) = 1; SOURCE(414, 23) (void) (XR←Notify((word) (( (bPt) gf←c5352)+40)/* gcCursorJobReady←v2692 */ )); SOURCE(439, 27) (void) (XR←Wait((word) (( (bPt) gf←c5352)+16)/* LOCK←v2608 */ , (word) (( (bPt) gf←c5352)+64)/* gcCursorDoneOrTimedOut←v2720 */ ) ); SOURCE(310, 156) (void) (XR←MonitorExit((word) (( (bPt) gf←c5352)+16)/* LOCK←v2608 */ )); return; } static void AfterGarbageCollection←P120(x←v3016) word x←v3016; { register ptr gf←c5384 = (ptr) &globalframe; /* AfterGarbageCollection: */ SOURCE(472, 127) (void) (XR←MonitorEntry((word) (( (bPt) gf←c5384)+16)/* LOCK←v2608 */ )); SOURCE(520, 26) (* (( (ptr) gf←c5384)+9)/* gcCursorSwitchToIt←v2664 */ ) = 0; SOURCE(548, 26) (* (( (ptr) gf←c5384)+8)/* gcCursorNeedsChange←v2636 */ ) = 1; SOURCE(576, 23) (void) (XR←Notify((word) (( (bPt) gf←c5384)+40)/* gcCursorJobReady←v2692 */ )); SOURCE(472, 127) (void) (XR←MonitorExit((word) (( (bPt) gf←c5384)+16)/* LOCK←v2608 */ )); return; } static word WaitForRequest←P180() { register ptr gf←c5416 = (ptr) &globalframe; word switchOn←v3088; /* WaitForRequest: */ SOURCE(605, 238) (void) (XR←MonitorEntry((word) (( (bPt) gf←c5416)+16)/* LOCK←v2608 */ )); SOURCE(664, 29) (void) (XR←Notify((word) (( (bPt) gf←c5416)+64)/* gcCursorDoneOrTimedOut←v2720 */ )); SOURCE(724, 59) lab←L100002: ; if ((0 == (* (( (ptr) gf←c5416)+8)/* gcCursorNeedsChange←v2636 */ ))) { } else { goto lab←L100000; }; SOURCE(754, 29) (void) (XR←Wait((word) (( (bPt) gf←c5416)+16)/* LOCK←v2608 */ , (word) (( (bPt) gf←c5416)+40)/* gcCursorJobReady←v2692 */ ) ); goto lab←L100002; lab←L100000: ; SOURCE(785, 27) (* (( (ptr) gf←c5416)+8)/* gcCursorNeedsChange←v2636 */ ) = 0; SOURCE(814, 29) switchOn←v3088 = (* (( (ptr) gf←c5416)+9)/* gcCursorSwitchToIt←v2664 */ ); SOURCE(605, 238) (void) (XR←MonitorExit((word) (( (bPt) gf←c5416)+16)/* LOCK←v2608 */ )); return(switchOn←v3088); } static void CursorChangeProcess←P240() { W6 var←c5448; register ptr gf←c5480 = (ptr) &globalframe; /* declaration of var←c5096 skipped */ /* CursorChangeProcess: */ SOURCE(849, 306) { word tmpAddr6; tmpAddr6 = (word) (( (ptr) &var←c5448)+4)/* var←c5096 */ ; (* (ptr) tmpAddr6 ) = ( ((word) (fPt) Protected←P360) ); (* (( (ptr) tmpAddr6) + 1) ) = 1; }; SOURCE(1004, 44) { word pd7; pd7 = (* (( (ptr) (* (( (ptr) gf←c5480)+34)/* var←c5128 */ ))+13) ); (void) ( *( (fPt) ((* (ptr) pd7 ))))(4, pd7); }; SOURCE(1050, 105) lab←L100005: ; SOURCE(1054, 67) SOURCE(1054, 67) { word var←c01; { word var←c048; var←c048 = (word) &var←c5448; var←c01 = (word) XR←Enable(( ((word) (fPt) NoName←Q528) ), ( ((word) (fPt) NoName←Q588) ), var←c048); }; /* removed trivial cond node */ }; SOURCE(1132, 23) { word pd8; pd8 = (* (( (ptr) (* (( (ptr) gf←c5480)+34)/* var←c5128 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd8 ))))(4000, pd8); }; goto lab←L100005; } static word NoName←Q528(formal←c043) word formal←c043; { SOURCE(1054, 67) (void) Protected←P360((word) ((( (bPt) formal←c043)+16))); return(0); } static void Protected←P360(formal←c5544) word formal←c5544; { register ptr gf←c5512 = (ptr) &globalframe; formal←c5544 = (formal←c5544 - 16); /* Protected: */ SOURCE(882, 109) SOURCE(905, 86) lab←L100012: ; SOURCE(905, 86) { word needGCCursor←v3208; SOURCE(918, 37) needGCCursor←v3208 = (word) WaitForRequest←P180(); SOURCE(957, 34) { word pd9; pd9 = (* (( (ptr) (* (( (ptr) gf←c5512)+36)/* var←c5192 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd9 ))))(needGCCursor←v3208, pd9); }; }; goto lab←L100012; } static void Init←P300() { register ptr gf←c5576 = (ptr) &globalframe; /* Init: */ SOURCE(1169, 250) SOURCE(1192, 70) SOURCE(1193, 69) { word var←c5224; { word pd10; pd10 = (* (( (ptr) (* (( (ptr) gf←c5576)+34)/* var←c5128 */ ))+6) ); var←c5224 = (word) ( *( (fPt) ((* (ptr) pd10 ))))(300, pd10); }; { word pd11; pd11 = (* (( (ptr) (* (( (ptr) gf←c5576)+34)/* var←c5128 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd11 ))))((word) (( (bPt) gf←c5576)+64)/* gcCursorDoneOrTimedOut←v2720 */ , var←c5224, pd11) ; }; }; SOURCE(1273, 43) SOURCE(1274, 42) { W2 var←c5256; { W2 var←c028; word var←c027; var←c027 = XR←ExtensionAlloc(4); { word tmpAddr12; tmpAddr12 = (word) var←c027; (* (ptr) tmpAddr12 ) = ( ((word) (fPt) NoName←Q648) ); (* (( (ptr) tmpAddr12) + 1) ) = 0; (* (( (ptr) tmpAddr12) + 2) ) = (word) (( (bPt) gf←c5576)+96)/* var←c4936 */ ; (* (( (ptr) tmpAddr12) + 3) ) = 0; }; (void) XR←Fork((word) &var←c028, var←c027); var←c5256 = var←c028; }; { word pd13; pd13 = (* (( (ptr) (* (( (ptr) gf←c5576)+34)/* var←c5128 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd13 ))))(var←c5256, pd13); }; }; SOURCE(1319, 48) { word pd14; pd14 = (* (( (ptr) (* (( (ptr) gf←c5576)+37)/* var←c5288 */ ))+5) ); (void) ( *( (fPt) ((* (ptr) pd14 ))))((word) (( (bPt) gf←c5576)+112)/* var←c5000 */ , 0, pd14); }; SOURCE(1369, 50) { word pd15; pd15 = (* (( (ptr) (* (( (ptr) gf←c5576)+37)/* var←c5288 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd15 ))))((word) (( (bPt) gf←c5576)+120)/* var←c5032 */ , 0, pd15); }; } static void NoName←Q588(formal←c037, formal←c200000, formal←c200001, formal←c200002, formal←c200003) word formal←c037; word formal←c200000; word formal←c200001; word formal←c200002; word formal←c200003; { register ptr gf←c047 = (ptr) &globalframe; if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c047)+35)/* var←c5160 */ ))+22) ))) { { word signal←v3672; word parameters←v3700; signal←v3672 = (* (ptr) formal←c200003 ); parameters←v3700 = (* (( (ptr) formal←c200003)+1) ); SOURCE(1091, 30) if ((0 == (* (ptr) (* (( (ptr) (* (( (ptr) gf←c047)+36)/* var←c5192 */ ))+6) ) ))) { SOURCE(1121, 9) (* (ptr) formal←c037 ) = 2; (* (( (ptr) formal←c037)+1) ) = 2; return; }; }; }; (* (ptr) formal←c037 ) = 0; (* (( (ptr) formal←c037)+1) ) = 0; return; } static word NoName←Q648(formal←c029) word formal←c029; { word var←c030; /* intermediary proc for a FORK, nArgs: 0, nRets: 0 */ var←c030 = (* (( (ptr) formal←c029)+2) ); formal←c029 = XR←ExtensionFree(formal←c029); (void) ( *( (fPt) ((* (ptr) var←c030 ))))(var←c030); return(0); } /* file: X11ViewersGCHackImpl, module: X11ViewersGCHackImpl, compiled at: August 16, 1993 12:26:12 pm PDT */ extern void XR←install←X11ViewersGCHackImpl() { NoName←Q468(); } extern void XR←run←X11ViewersGCHackImpl() { XR←Start(&globalframe); }