/* 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 #include 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); }