/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: February 5, 1993 1:58:23 pm PST */ /* C2C version: October 7, 1992 (native) */ /* ref-counting: off */ /* file: GGCaretImpl, module: GGCaretImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [2783467314,3988694136] GGCaretImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef W7 *W7Pt; typedef word (*fPt)(); typedef struct {word f0, f1;} W2; typedef W2 *W2Pt; #define SOURCE(p, l) /* source p, l */ static float fc7 = 0.0; static float fc8 = -1.0; static float fc9 = 4.0; static float fc10 = 6.0; static float fc12 = 2.0; static float fc14 = 8.0; static float fc15 = 16.0; static void NoName←Q840(); static void GGCaretImpl←P0(); static word Create←P60(); static void Copy←P120(); static void Kill←P180(); static word Exists←P240(); static word BoundBoxOfCaret←P300(); static void SitOn←P360(); static word GetChair←P420(); static word SittingOnEnd←P480(); static void NoAttractor←P540(); static void SetAttractor←P600(); static word GetAttractor←P660(); static void GetPoint←P720(); static void GetNormal←P780(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\223\145\303\043\300\372\023\025\003\100\370\000\000"}; static struct {unsigned f; char r[4];} string2 = {196611, "\004@`"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\245\350\127\062\300\355\276\244\170\100\164\000\000"}; static struct {unsigned f; char r[16];} string4 = {851984, "\257\300\265\217\206\011\300\172\271\371\033\100\150\000\000"}; static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\336\025\013\356\300\216\115\352\271\100\150\000\000"}; static struct {unsigned f; char r[16];} string6 = {851984, "\257\300\223\031\346\162\300\275\253\133\335\100\150\000\000"}; static struct { word f0[6]; word f6; word f7; word f8; word f9; word f10; 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; word f27; word f28; word f29; word f30; word f31; word f32; word f33[4]; } globalframe = { {0}, (word) GetNormal←P780, 0, (word) GetPoint←P720, 0, (word) GetAttractor←P660, 0, (word) SetAttractor←P600, 0, (word) NoAttractor←P540, 0, (word) SittingOnEnd←P480, 0, (word) GetChair←P420, 0, (word) SitOn←P360, 0, (word) BoundBoxOfCaret←P300, 0, (word) Exists←P240, 0, (word) Kill←P180, 0, (word) Copy←P120, 0, (word) Create←P60, 0, (word) GGCaretImpl←P0, {0} }; static void NoName←Q840() { register ptr gf←c057 = (ptr) &globalframe; word var←c7780; (* (( (ptr) gf←c057)+4) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (void) XR←DeclareGlobalFrame((word) "GGCaretImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string3)), (word) (( (bPt) gf←c057)+128) /* var←c7588 */ ); var←c7780 = (word) XR←ImportInterface((word) "GGBoundBox", (word) XR←GetTypeIndexS((word) (&string4)), 24); (* (( (ptr) gf←c057)+34)/* var←c7684 */ ) = var←c7780; (void) XR←ImportProcS(var←c7780, 68681990); var←c7780 = (word) XR←ImportInterface((word) "GGSliceOps", (word) XR←GetTypeIndexS((word) (&string5)), 73); (* (( (ptr) gf←c057)+35)/* var←c7748 */ ) = var←c7780; (void) XR←ImportProcS(var←c7780, 67388929); var←c7780 = (word) XR←ExportInterface((word) "GGCaret", (word) XR←GetTypeIndexS((word) (&string6)), 13); (* (( (ptr) gf←c057)+36)/* var←c7812 */ ) = var←c7780; (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+120)/* var←c7556 */ , 67108864); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+112)/* var←c7524 */ , 524546); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+104)/* var←c7492 */ , 262657); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+96)/* var←c7460 */ , 67371777); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+88)/* var←c7428 */ , 67634178); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+80)/* var←c7396 */ , 525570); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+72)/* var←c7364 */ , 67372545); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+64)/* var←c7332 */ , 67372801); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+48)/* var←c7268 */ , 1574916); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+56)/* var←c7300 */ , 264449); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+40)/* var←c7236 */ , 67373569); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+32)/* var←c7204 */ , 134482689); (void) XR←ExportProcS(var←c7780, (word) (( (bPt) gf←c057)+24)/* var←c7172 */ , 134482945); } static void GGCaretImpl←P0(formal←c022, formal←c021) word formal←c022; word formal←c021; { /* GGCaretImpl: */ } static word Create←P60() { register ptr gf←c7844 = (ptr) &globalframe; word caret←v3472; /* Create: */ SOURCE(736, 68) SOURCE(736, 68) caret←v3472 = 0; SOURCE(783, 21) { word var←c7620; var←c7620 = XR←NewObject(28, (* (( (ptr) gf←c7844)+4) )); (* (( (ptr) var←c7620)+1) ) = (* (ptr) &fc7 ); (* (( (ptr) var←c7620)+2) ) = (* (ptr) &fc7 ); (* (( (ptr) var←c7620)+3) ) = (* (ptr) &fc7 ); (* (( (ptr) var←c7620)+4) ) = (* (ptr) &fc8 ); caret←v3472 = var←c7620; }; SOURCE(736, 68) return(caret←v3472); } static void Copy←P120(to←v3532, from←v3560) word to←v3532; word from←v3560; { /* Copy: */ SOURCE(809, 51) SOURCE(849, 11) (* (W7Pt) to←v3532 ) = (* (W7Pt) from←v3560 ); } static void Kill←P180(caret←v3620) word caret←v3620; { /* Kill: */ SOURCE(866, 57) SOURCE(903, 20) (* (ptr) caret←v3620 ) = 0; } static word Exists←P240(caret←v3680) word caret←v3680; { word var←c3724; /* Exists: */ SOURCE(928, 74) SOURCE(982, 20) return((* (ptr) caret←v3680 )); } static word BoundBoxOfCaret←P300(caret←v3784, ggData←v3812) word caret←v3784; word ggData←v3812; { register ptr gf←c7876 = (ptr) &globalframe; word box←v3856; word fudge←v4724; word leftOffset←v4752; word rightOffset←v4780; word topOffset←v4808; word bottomOffset←v4836; /* BoundBoxOfCaret: */ SOURCE(1008, 882) SOURCE(1008, 882) box←v3856 = 0; SOURCE(1113, 17) fudge←v4724 = (* (ptr) &fc9 ); SOURCE(1180, 60) leftOffset←v4752 = (* (ptr) &fc7 ); rightOffset←v4780 = (* (ptr) &fc7 ); topOffset←v4808 = (* (ptr) &fc7 ); bottomOffset←v4836 = (* (ptr) &fc7 ); SOURCE(1242, 32) if ((caret←v3784 == 0) || (ggData←v3812 == 0)) { SOURCE(1274, 5) (void) XR←RaiseUnnamedError(); }; if ((caret←v3784 == (* (( (ptr) ggData←v3812)+13) ))) { SOURCE(1322, 35) { word x11; word x13; *(float*)&leftOffset←v4752 = ( x11 = (* (ptr) &fc10 ), *(float*)&x11 ) / ( x13 = (* (ptr) &fc12 ), *(float*)&x13 ); }; SOURCE(1359, 24) rightOffset←v4780 = leftOffset←v4752; SOURCE(1385, 15) topOffset←v4808 = (* (ptr) &fc7 ); SOURCE(1402, 34) bottomOffset←v4836 = (* (ptr) &fc14 ); } else { if ((caret←v3784 == (* (( (ptr) ggData←v3812)+14) ))) { SOURCE(1466, 36) { word x16; word x17; *(float*)&leftOffset←v4752 = ( x16 = (* (ptr) &fc15 ), *(float*)&x16 ) / ( x17 = (* (ptr) &fc12 ), *(float*)&x17 ); }; SOURCE(1504, 24) rightOffset←v4780 = leftOffset←v4752; SOURCE(1530, 36) { word x18; word x19; *(float*)&topOffset←v4808 = ( x18 = (* (ptr) &fc15 ), *(float*)&x18 ) / ( x19 = (* (ptr) &fc12 ), *(float*)&x19 ); }; SOURCE(1568, 24) bottomOffset←v4836 = topOffset←v4808; } else { SOURCE(1608, 11) return(0); }; }; SOURCE(1621, 29) { word x20; word x21; *(float*)&leftOffset←v4752 = ( x20 = leftOffset←v4752, *(float*)&x20 ) + ( x21 = fudge←v4724, *(float*)&x21 ); }; SOURCE(1652, 31) { word x22; word x23; *(float*)&rightOffset←v4780 = ( x22 = rightOffset←v4780, *(float*)&x22 ) + ( x23 = fudge←v4724, *(float*)&x23 ); }; SOURCE(1685, 33) { word x24; word x25; *(float*)&bottomOffset←v4836 = ( x24 = bottomOffset←v4836, *(float*)&x24 ) + ( x25 = fudge←v4724, *(float*)&x25 ); }; SOURCE(1720, 27) { word x26; word x27; *(float*)&topOffset←v4808 = ( x26 = topOffset←v4808, *(float*)&x26 ) + ( x27 = fudge←v4724, *(float*)&x27 ); }; SOURCE(1749, 141) { word pd28; word x29; word x30; float tf31; word x32; word x33; float tf34; word x35; word x36; float tf37; word x38; word x39; float tf40; pd28 = (* (( (ptr) (* (( (ptr) gf←c7876)+34)/* var←c7684 */ ))+5) ); return((word) ( *( (fPt) ((* (ptr) pd28 ))))(( tf31 = ( x29 = (* (( (ptr) caret←v3784)+1) ), *(float*)&x29 ) - ( x30 = leftOffset←v4752, *(float*)&x30 ), *(word*)&tf31 ), ( tf34 = ( x32 = (* (( (ptr) caret←v3784)+2) ), *(float*)&x32 ) - ( x33 = bottomOffset←v4836, *(float*)&x33 ), *(word*)&tf34 ), ( tf37 = ( x35 = (* (( (ptr) caret←v3784)+1) ), *(float*)&x35 ) + ( x36 = rightOffset←v4780, *(float*)&x36 ), *(word*)&tf37 ), ( tf40 = ( x38 = (* (( (ptr) caret←v3784)+2) ), *(float*)&x38 ) + ( x39 = topOffset←v4808, *(float*)&x39 ), *(word*)&tf40 ), 0, 0, pd28)); }; } static void SitOn←P360(caret←v3916, chair←v3944) word caret←v3916; word chair←v3944; { /* SitOn: */ SOURCE(1896, 87) SOURCE(1964, 19) (* (( (ptr) caret←v3916)+5) ) = chair←v3944; } static word GetChair←P420(caret←v4004) word caret←v4004; { word chair←v4048; /* GetChair: */ SOURCE(1989, 93) SOURCE(1989, 93) chair←v4048 = 0; SOURCE(2063, 19) chair←v4048 = (* (( (ptr) caret←v4004)+5) ); SOURCE(1989, 93) return(chair←v4048); } static word SittingOnEnd←P480(caret←v4108) word caret←v4108; { register ptr gf←c7908 = (ptr) &globalframe; word var←c4152; /* SittingOnEnd: */ SOURCE(2088, 151) SOURCE(2148, 40) if (((* (( (ptr) caret←v4108)+5) ) == 0)) { SOURCE(2175, 13) return(0); }; SOURCE(2190, 49) { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf←c7908)+35)/* var←c7748 */ ))+74) ); return((word) ( *( (fPt) ((* (ptr) pd41 ))))((* ((( (ptr) caret←v4108)+5)) ), pd41)); }; } static void NoAttractor←P540(caret←v4212) word caret←v4212; { /* NoAttractor: */ SOURCE(2245, 65) SOURCE(2289, 21) (* (( (ptr) caret←v4212)+6) ) = 0; } static void SetAttractor←P600(caret←v4272, point←v4300, normal←v4328, attractor←v4356) word caret←v4272; W2 point←v4300; W2 normal←v4328; word attractor←v4356; { /* SetAttractor: */ SOURCE(2316, 187) SOURCE(2411, 19) (* (ptr) caret←v4272 ) = 1; SOURCE(2432, 19) (* (W2Pt) (( (ptr) caret←v4272)+1) ) = point←v4300; SOURCE(2453, 21) (* (W2Pt) (( (ptr) caret←v4272)+3) ) = normal←v4328; SOURCE(2476, 27) (* (( (ptr) caret←v4272)+6) ) = attractor←v4356; } static word GetAttractor←P660(caret←v4432) word caret←v4432; { word attractor←v4476; /* GetAttractor: */ SOURCE(2509, 101) SOURCE(2509, 101) attractor←v4476 = 0; SOURCE(2583, 27) attractor←v4476 = (* (( (ptr) caret←v4432)+6) ); SOURCE(2509, 101) return(attractor←v4476); } static void GetPoint←P720(formal←c053, caret←v4548) word formal←c053; word caret←v4548; { W2 point←v4592; /* GetPoint: */ SOURCE(2616, 83) SOURCE(2680, 19) point←v4592 = (* (W2Pt) (( (ptr) caret←v4548)+1) ); /* removed tail goto */ (* (W2Pt) formal←c053 ) = point←v4592; return; } static void GetNormal←P780(formal←c056, caret←v4652) word formal←c056; word caret←v4652; { W2 normal←v4696; /* GetNormal: */ SOURCE(2705, 88) SOURCE(2772, 21) normal←v4696 = (* (W2Pt) (( (ptr) caret←v4652)+3) ); /* removed tail goto */ (* (W2Pt) formal←c056 ) = normal←v4696; return; } /* file: GGCaretImpl, module: GGCaretImpl, compiled at: February 5, 1993 1:58:23 pm PST */ extern void XR←install←GGCaretImpl() { NoName←Q840(); } extern void XR←run←GGCaretImpl() { XR←Start(&globalframe); }