/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: October 25, 1993 12:11:23 pm PDT */ /* C2C version: April 20, 1993 (sun4) */ /* ref-counting: off */ /* file: XlColorAccessImpl, module: XlColorAccessImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [1481436486,1454386006] XlColorAccessImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {W8 f; W8 r;} W16; typedef struct {W16 f; word r;} W17; typedef struct {word f0, f1;} W2; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; typedef struct {W8 f; W6 r;} W14; typedef struct {word f0, f1, f2;} W3; typedef struct {word f0, f1, f2, f3;} W4; typedef W4 *W4Pt; typedef W3 *W3Pt; typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef struct {W8 f; W7 r;} W15; typedef W7 *W7Pt; typedef struct {W16 f; W8 r;} W24; typedef W8 *W8Pt; typedef W2 *W2Pt; #define SOURCE(p, l) /* source p, l */ static float fc25 = 65535.0; #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) ) static float fc33 = 255.0; #define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i ) static float fc38 = 1.0; static float fc45 = 0.25; static float fc55 = 0.5; static float fc56 = 0.1; static float fc57 = 0.3; static float fc58 = 0.85; #define MIN(cast, x, y) ( ( cast x) < ( cast y) ? (x) : (y) ) static float fc72 = 0.7; static float fc73 = 0.75; static float fc121 = 0.4545454; static float fc122 = 2.2; static void NoName←Q3012(); static void XlColorAccessImpl←P0(); static word FindVisualType←P60(); static word RealColorValToXColorVal←P120(); static word Idx2Byte←P240(); static word ToByte←P300(); static void RampColors←P360(); static word TryWithStandardColorMap←P420(); static word SearchMaps←P1248(); static word TryMap←P1308(); static void TryAdding←P1416(); static word NoName←Q3072(); static word AllocateForDefaultColormap←P480(); static word NoName←Q3132(); static word NoName←Q3192(); static word NoName←Q3252(); static void EachColor←P2004(); static word AllocateForNewColormap←P540(); static word NextPixel←P2064(); static void EachColor←P2124(); static void FindBlackAndWhite←P600(); static void GrabEm←P2352(); static word NoName←Q3312(); static void ReturnEm←P2412(); static word Access←P660(); static word Protected←P2664(); static word NewCD←P720(); static word ColorDataInit←P780(); static void NoName←Q3372(); static void NoName←Q3432(); static void NoName←Q3492(); static void NoName←Q3552(); static void NoName←Q3612(); static struct {unsigned f; char r[4];} string1 = {65540, "\242\000\000"}; static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\105\154\000\000"}; static struct {unsigned f; char r[4];} string3 = {196611, "\004A\330"}; static struct {unsigned f; char r[44];} string4 = {2752556, "\260\006\005\146\151\162\163\164\257\300\265\371\352\317\300\364\125\216\164\100\164\005\004\162\145\163\164\214\257\300\265\371\352\317\300\364\125\216\164\100\164\261\000"}; static struct {unsigned f; char r[4];} string5 = {131074, "\003\001\000"}; static struct {unsigned f; char r[20];} string6 = {1179668, "\260\006\005\146\151\162\163\164\241\005\004\162\145\163\164\214\241\261\000"}; static struct {unsigned f; char r[44];} string7 = {2752556, "\260\006\005\146\151\162\163\164\257\300\351\276\264\273\300\115\104\320\264\122\200\005\004\162\145\163\164\214\257\300\351\276\264\273\300\115\104\320\264\122\200\261\000"}; static struct {unsigned f; char r[4];} string8 = {131074, "\003\007\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\331\133\131\347\300\165\343\006\212\100\164\000\000"}; static struct {unsigned f; char r[4];} string10 = {196611, "\004@`"}; static struct {unsigned f; char r[4];} string11 = {65540, "\251\000\000"}; static struct {unsigned f; char r[4];} string12 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string13 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string14 = {917520, "makingProgress\000"}; static struct {unsigned f; char r[16];} string15 = {851984, "\257\300XL\355F\300V\260+V@t\000\000"}; static struct {unsigned f; char r[12];} string16 = {589833, "\006\003 \001$\001@X\001\000\000"}; static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\246\205\220\035\300\344\000\142\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\245\247\302\156\300\052\156\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\100\164\000\000"}; static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\343\366\304\342\300\307\072\365\214\100\150\000\000"}; static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\331\133\131\347\300\165\343\006\212\100\150\000\000"}; static struct { word f0[23]; word f23; word f24; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33; word f34; word f35; word f36; word f37; word f38; word f39; word f40; word f41; word f42; word f43; word f44; word f45; word f46; word f47; word f48[7]; } globalframe = { {0}, (word) ColorDataInit←P780, 0, (word) NewCD←P720, 0, (word) Access←P660, 0, (word) FindBlackAndWhite←P600, 0, (word) AllocateForNewColormap←P540, 0, (word) AllocateForDefaultColormap←P480, 0, (word) TryWithStandardColorMap←P420, 0, (word) RampColors←P360, 0, (word) ToByte←P300, 0, (word) Idx2Byte←P240, 0, (word) RealColorValToXColorVal←P120, 0, (word) FindVisualType←P60, 0, (word) XlColorAccessImpl←P0, {0} }; static void NoName←Q3012() { register ptr gf←c0260 = (ptr) &globalframe; word var←c20352; (* (( (ptr) gf←c0260)+10) ) = (word) XR←GetTypeIndexS((word) (&string1)); (* (( (ptr) gf←c0260)+11) ) = (word) XR←GetTypeIndex((word) &string2, 0, (word) &string3); (* (( (ptr) gf←c0260)+16) ) = (word) XR←GetTypeIndex((word) &string4, 0, (word) &string5); (* (( (ptr) gf←c0260)+17) ) = (word) XR←GetTypeIndex((word) &string6, 0, (word) &string5); (* (( (ptr) gf←c0260)+18) ) = (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8); (* (( (ptr) gf←c0260)+19) ) = (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10); (* (( (ptr) gf←c0260)+20) ) = (word) XR←GetTypeIndexS((word) (&string11)); (* (( (ptr) gf←c0260)+21) ) = (word) XR←GetTypeIndex((word) &string12, 0, (word) &string13); (* (ptr) (( (bPt) gf←c0260)+88) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0260)+21) ), (word) &string14); (void) XR←DeclareGlobalFrame((word) "XlColorAccessImpl", &globalframe, (word) XR←GetTypeIndex((word) &string15, 0, (word) &string16) , (word) (( (bPt) gf←c0260)+188)/* var←c18240 */ ); var←c20352 = (word) XR←ImportInterface((word) "Process", (word) XR←GetTypeIndexS((word) (&string17)), 22); (* (( (ptr) gf←c0260)+53)/* var←c20160 */ ) = var←c20352; (void) XR←ImportProcS(var←c20352, 266753); var←c20352 = (word) XR←ImportInterface((word) "Real", (word) XR←GetTypeIndexS((word) (&string18)), 11); (* (( (ptr) gf←c0260)+50)/* var←c18368 */ ) = var←c20352; (void) XR←ImportProcS(var←c20352, 67371521); var←c20352 = (word) XR←ImportInterface((word) "RealFns", (word) XR←GetTypeIndexS((word) (&string19)), 36); (* (( (ptr) gf←c0260)+49)/* var←c18336 */ ) = var←c20352; (void) XR←ImportProcS(var←c20352, 67633922); var←c20352 = (word) XR←ImportInterface((word) "Xl", (word) XR←GetTypeIndexS((word) (&string20)), 218); (* (( (ptr) gf←c0260)+52)/* var←c18912 */ ) = var←c20352; (void) XR←ImportProcS(var←c20352, 793091); (void) XR←ImportProcS(var←c20352, 68465669); (void) XR←ImportProcS(var←c20352, 794115); (void) XR←ImportProcS(var←c20352, 67641090); (void) XR←ImportProcS(var←c20352, 135576581); (void) XR←ImportProcS(var←c20352, 1097476); (void) XR←ImportProcS(var←c20352, 534786); (void) XR←ImportProcS(var←c20352, 535042); (void) XR←ImportProcS(var←c20352, 1359365); (void) XR←ImportProcS(var←c20352, 269793795); var←c20352 = (word) XR←ImportInterface((word) "XlRGBColorMaps", (word) XR←GetTypeIndexS((word) (&string21)), 1); (* (( (ptr) gf←c0260)+51)/* var←c18880 */ ) = var←c20352; (void) XR←ImportProcS(var←c20352, 67895299); var←c20352 = (word) XR←ExportInterface((word) "XlColorAccess", (word) XR←GetTypeIndexS((word) (&string22)), 3); (* (( (ptr) gf←c0260)+54)/* var←c20384 */ ) = var←c20352; (void) XR←ExportProcS(var←c20352, (word) (( (bPt) gf←c0260)+108)/* var←c17920 */ , 67895299, (word) "Access"); (void) XR←ExportProcS(var←c20352, (word) (( (bPt) gf←c0260)+172)/* var←c18176 */ , 67633410, (word) "RealColorValToXColorVal") ; (void) XR←ExportProcS(var←c20352, (word) (( (bPt) gf←c0260)+180)/* var←c18208 */ , 67895811, (word) "FindVisualType"); } static void XlColorAccessImpl←P0(formal←c041, formal←c039) word formal←c041; word formal←c039; { register ptr gf←c20416 = (ptr) &globalframe; /* XlColorAccessImpl: */ SOURCE(104, 12994) SOURCE(240, 21) (* (( (ptr) gf←c20416)+8)/* myKey←v2776 */ ) = XR←NewObject(4, (* (( (ptr) gf←c20416)+10) )); SOURCE(1307, 76) { word var←c18272; var←c18272 = XR←NewObject(36, (* (( (ptr) gf←c20416)+11) )); (* (( (ptr) var←c18272)+1) ) = 1; (* (( (ptr) gf←c20416)+9)/* detailsForSynchronous←v2916 */ ) = var←c18272; }; } static word FindVisualType←P60(screen←v3264, depth←v3292, class←v3320) word screen←v3264; word depth←v3292; word class←v3320; { word var←c3364; /* FindVisualType: */ SOURCE(294, 371) SOURCE(294, 371) var←c3364 = 0; SOURCE(412, 253) { register word dl←v5632; dl←v5632 = (* (( (ptr) screen←v3264)+19) ); lab←L100003: ; if ((dl←v5632 != 0)) { } else { goto lab←L100000; }; SOURCE(483, 182) if (((* (( (ptr) (* (ptr) dl←v5632 ))+3) ) == depth←v3292)) { SOURCE(514, 134) { register word vtl←v5676; vtl←v5676 = (* (( (ptr) (* (ptr) dl←v5632 ))+5) ); lab←L100007: ; if ((vtl←v5676 != 0)) { } else { goto lab←L100004; }; SOURCE(600, 48) if (((* (( (ptr) (* (ptr) vtl←v5676 ))+1) ) == class←v3320)) { SOURCE(630, 18) return((* (ptr) vtl←v5676 )); }; vtl←v5676 = (* (( (ptr) vtl←v5676)+1) ); goto lab←L100007; lab←L100004: ; }; SOURCE(659, 6) return(var←c3364); }; dl←v5632 = (* (( (ptr) dl←v5632)+1) ); goto lab←L100003; lab←L100000: ; }; SOURCE(294, 371) return(var←c3364); } static word RealColorValToXColorVal←P120(r←v3424, invGamma←v3452) word r←v3424; word invGamma←v3452; { register ptr gf←c20448 = (ptr) &globalframe; word v←v3496; word s←v5832; /* RealColorValToXColorVal: */ SOURCE(683, 329) SOURCE(892, 50) { word var←c18304; { word pd23; word x24; word x26; pd23 = (* (( (ptr) (* (( (ptr) gf←c20448)+49)/* var←c18336 */ ))+7) ); *(float*)&var←c18304 = ( x24 = (word) ( *( (fPt) ((* (ptr) pd23 ))))(r←v3424, invGamma←v3452, pd23), *(float*)&x24 ) * ( x26 = (* (ptr) &fc25 ), *(float*)&x26 ); }; { word pd27; pd27 = (* (( (ptr) (* (( (ptr) gf←c20448)+50)/* var←c18368 */ ))+6) ); s←v5832 = (word) ( *( (fPt) ((* (ptr) pd27 ))))(var←c18304, pd27); }; }; SOURCE(944, 68) { word var←c18400; var←c18400 = s←v5832; if (( (int)var←c18400 <= (int)0)) { SOURCE(966, 5) v←v3496 = 0; } else { if (( (int)var←c18400 >= (int)65535)) { SOURCE(985, 9) v←v3496 = 65535; } else { SOURCE(1007, 5) v←v3496 = BCK(s←v5832, 65536); }; }; }; SOURCE(683, 329) return(v←v3496); } static word Idx2Byte←P240(val←v3688, max←v3716, gamma←v3744) word val←v3688; word max←v3716; word gamma←v3744; { register ptr gf←c20480 = (ptr) &globalframe; word var←c3788; word float←v6008; /* Idx2Byte: */ SOURCE(1128, 173) SOURCE(1205, 17) { float tf28; float←v6008 = ( tf28 = (float)(unsigned)val←v3688, *(word*)&tf28 ); }; SOURCE(1224, 19) { word x29; *(float*)&float←v6008 = ( x29 = float←v6008, *(float*)&x29 ) / (float)(unsigned)max←v3716; }; SOURCE(1245, 32) { word pd30; pd30 = (* (( (ptr) (* (( (ptr) gf←c20480)+49)/* var←c18336 */ ))+7) ); float←v6008 = (word) ( *( (fPt) ((* (ptr) pd30 ))))(float←v6008, gamma←v3744, pd30); }; SOURCE(1279, 22) return((word) ToByte←P300(float←v6008)); } static word ToByte←P300(r←v3848) word r←v3848; { register ptr gf←c20512 = (ptr) &globalframe; word var←c3892; word s←v6052; /* ToByte: */ SOURCE(1386, 147) SOURCE(1428, 26) { word pd31; word x32; word x34; float tf35; pd31 = (* (( (ptr) (* (( (ptr) gf←c20512)+50)/* var←c18368 */ ))+6) ); s←v6052 = (word) ( *( (fPt) ((* (ptr) pd31 ))))(( tf35 = ( x32 = r←v3848, *(float*)&x32 ) * ( x34 = (* (ptr) &fc33 ), *(float*)&x34 ), *(word*)&tf35 ), pd31); }; SOURCE(1456, 56) { word var←c18464; var←c18464 = s←v6052; if (( (int)var←c18464 <= (int)0)) { SOURCE(1478, 10) return(0); } else { if (( (int)var←c18464 >= (int)255)) { SOURCE(1500, 12) return(255); }; }; }; SOURCE(1523, 10) return(BCK(s←v6052, 256)); } static void RampColors←P360(eachColor←v3952, reds←v3980, greens←v4008, blues←v4036) word eachColor←v3952; word reds←v3980; word greens←v4008; word blues←v4036; { word limit←v6096; /* RampColors: */ SOURCE(1539, 617) SOURCE(1642, 32) { word idx36; limit←v6096 = ( idx36 = (word) (((reds←v3980 * greens←v4008) * blues←v4036) - 1), SGNCK(idx36) ); }; SOURCE(1781, 219) { register word b←v6284 = 0; register word noName←c18496; noName←c18496 = blues←v4036; if ((b←v6284 >= noName←c18496)) { goto lab←L100008; }; lab←L100011: ; SOURCE(1809, 191) { register word g←v6328 = 0; register word noName←c18528; noName←c18528 = greens←v4008; if ((g←v6328 >= noName←c18528)) { goto lab←L100012; }; lab←L100015: ; SOURCE(1838, 162) { register word r←v6372 = 0; register word noName←c18560; noName←c18560 = reds←v3980; if ((r←v6372 >= noName←c18560)) { goto lab←L100016; }; lab←L100019: ; { word a←v6416; SOURCE(1865, 29) { word idx37; a←v6416 = ( idx37 = (word) ((((r←v6372 * greens←v4008) + g←v6328) * blues←v4036) + b←v6284), SGNCK(idx37) ); }; SOURCE(1896, 104) if ( ( (a←v6416 < limit←v6096) ? (a←v6416 > 0) : 0 ) ) { SOURCE(1946, 54) { word x39; float tf40; word x41; float tf42; word x43; float tf44; (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))(( tf40 = (float)(unsigned)r←v6372 / ((float)(unsigned)reds←v3980 - ( /*1*/ x39 = (* (ptr) &fc38 ), *(float*)&x39 /*1*/ )), *(word*)&tf40 ), ( tf42 = (float)(unsigned)g←v6328 / ((float)(unsigned)greens←v4008 - ( /*1*/ x41 = (* (ptr) &fc38 ), *(float*)&x41 /*1*/ )), *(word*)&tf42 ), ( tf44 = (float)(unsigned)b←v6284 / ((float)(unsigned)blues←v4036 - ( /*1*/ x43 = (* (ptr) &fc38 ), *(float*)&x43 /*1*/ )), *(word*)&tf44 ), eachColor←v3952); }; }; }; r←v6372 = (r←v6372 + 1); if ((r←v6372 < noName←c18560)) { goto lab←L100019; }; lab←L100016: ; }; g←v6328 = (g←v6328 + 1); if ((g←v6328 < noName←c18528)) { goto lab←L100015; }; lab←L100012: ; }; b←v6284 = (b←v6284 + 1); if ((b←v6284 < noName←c18496)) { goto lab←L100011; }; lab←L100008: ; }; SOURCE(2029, 34) SOURCE(1726, 18) (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))((* (ptr) &fc45 ), (* (ptr) &fc45 ), (* (ptr) &fc45 ), eachColor←v3952) ; SOURCE(1746, 30) { word x46; word x47; float tf48; word x49; word x50; float tf51; word x52; word x53; float tf54; (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))(( tf48 = ( x46 = (* (ptr) &fc38 ), *(float*)&x46 ) - ( x47 = (* (ptr) &fc45 ), *(float*)&x47 ), *(word*)&tf48 ), ( tf51 = ( x49 = (* (ptr) &fc38 ), *(float*)&x49 ) - ( x50 = (* (ptr) &fc45 ), *(float*)&x50 ), *(word*)&tf51 ), ( tf54 = ( x52 = (* (ptr) &fc38 ), *(float*)&x52 ) - ( x53 = (* (ptr) &fc45 ), *(float*)&x53 ), *(word*)&tf54 ), eachColor←v3952); }; SOURCE(2081, 24) (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))((* (ptr) &fc55 ), (* (ptr) &fc55 ), (* (ptr) &fc55 ), eachColor←v3952) ; SOURCE(2124, 32) SOURCE(1726, 18) (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))((* (ptr) &fc56 ), (* (ptr) &fc57 ), (* (ptr) &fc58 ), eachColor←v3952) ; SOURCE(1746, 30) { word x59; word x60; float tf61; word x62; word x63; float tf64; word x65; word x66; float tf67; (void) ( *( (fPt) ((* (ptr) eachColor←v3952 ))))(( tf61 = ( x59 = (* (ptr) &fc38 ), *(float*)&x59 ) - ( x60 = (* (ptr) &fc56 ), *(float*)&x60 ), *(word*)&tf61 ), ( tf64 = ( x62 = (* (ptr) &fc38 ), *(float*)&x62 ) - ( x63 = (* (ptr) &fc57 ), *(float*)&x63 ), *(word*)&tf64 ), ( tf67 = ( x65 = (* (ptr) &fc38 ), *(float*)&x65 ) - ( x66 = (* (ptr) &fc58 ), *(float*)&x66 ), *(word*)&tf67 ), eachColor←v3952); }; } static word TryWithStandardColorMap←P420(formal←c0320, formal←c0321, blackPixel←v4268, whitePixel←v4296, gamma←v4324, formal←c0322) word formal←c0320; word formal←c0321; word blackPixel←v4268; word whitePixel←v4296; word gamma←v4324; word formal←c0322; { W17 var←c20544; /* declaration of screen←v4212 skipped */ /* declaration of vt←v4240 skipped */ /* declaration of invGamma←v4352 skipped */ register ptr gf←c20576 = (ptr) &globalframe; /* declaration of entries←v4396 skipped */ /* declaration of var←c18592 skipped */ /* declaration of var←c18624 skipped */ /* declaration of var←c18656 skipped */ /* declaration of colorMapSize←v6516 skipped */ /* declaration of map←v6544 skipped */ (* (( (ptr) &var←c20544)+4)/* screen←v4212 */ ) = formal←c0320; (* (( (ptr) &var←c20544)+5)/* vt←v4240 */ ) = formal←c0321; (* (( (ptr) &var←c20544)+6)/* invGamma←v4352 */ ) = formal←c0322; /* TryWithStandardColorMap: */ SOURCE(2183, 2668) { word tmpAddr68; tmpAddr68 = (word) (( (ptr) &var←c20544)+8)/* var←c18592 */ ; (* (ptr) tmpAddr68 ) = ( ((word) (fPt) TryAdding←P1416) ); (* (( (ptr) tmpAddr68) + 1) ) = 1; }; { word tmpAddr69; tmpAddr69 = (word) (( (ptr) &var←c20544)+10)/* var←c18624 */ ; (* (ptr) tmpAddr69 ) = ( ((word) (fPt) TryMap←P1308) ); (* (( (ptr) tmpAddr69) + 1) ) = 1; }; { word tmpAddr70; tmpAddr70 = (word) (( (ptr) &var←c20544)+12)/* var←c18656 */ ; (* (ptr) tmpAddr70 ) = ( ((word) (fPt) SearchMaps←P1248) ); (* (( (ptr) tmpAddr70) + 1) ) = 1; }; SOURCE(2183, 2668) (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ) = 0; SOURCE(3193, 49) { word x71; (* (( (ptr) &var←c20544)+14)/* colorMapSize←v6516 */ ) = (x71 = (* (( (ptr) (* (( (ptr) &var←c20544)+5)/* vt←v4240 */ ))+3) ), MIN( (unsigned) , x71, 256)); }; SOURCE(3245, 42) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ) = 0; SOURCE(3289, 45) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ) = (word) TryMap←P1308(27, (word) (( (bPt) &var←c20544)+40)/* var←c18624 */ ) ; SOURCE(3336, 58) if (((* (( (ptr) &var←c20544)+15)/* map←v6544 */ ) == 0)) { SOURCE(3352, 42) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ) = (word) TryMap←P1308(25, (word) (( (bPt) &var←c20544)+40)/* var←c18624 */ ) ; }; SOURCE(3396, 1455) if (((* (( (ptr) &var←c20544)+15)/* map←v6544 */ ) != 0)) { SOURCE(3412, 1448) { /* declaration of addingFailed←v6936 skipped */ SOURCE(3414, 26) (* (( (ptr) &var←c20544)+16)/* addingFailed←v6936 */ ) = 0; SOURCE(4079, 409) { register word b←v7124 = 0; register word noName←c18688; noName←c18688 = (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+5) ); if ((b←v7124 > noName←c18688)) { goto lab←L100020; }; lab←L100023: ; SOURCE(4113, 375) { register word g←v7168 = 0; register word noName←c18720; noName←c18720 = (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+3) ); if ((g←v7168 > noName←c18720)) { goto lab←L100024; }; lab←L100027: ; SOURCE(4148, 340) { register word r←v7212 = 0; register word noName←c18752; noName←c18752 = (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+1) ); if ((r←v7212 > noName←c18752)) { goto lab←L100028; }; lab←L100031: ; { word pixel←v7256; SOURCE(4181, 88) pixel←v7256 = (((((r←v7212 * (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+2) )) + (g←v7168 * (* (( (ptr) (* ( ( (ptr) &var←c20544)+15)/* map←v6544 */ ))+4) ))) + (b←v7124 * (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+6) ))) + (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+7) )) & 0377); SOURCE(4271, 217) if ((pixel←v7256 < (* (( (ptr) &var←c20544)+14)/* colorMapSize←v6516 */ ))) { SOURCE(4298, 192) { word red←v7300; word green←v7328; word blue←v7356; SOURCE(4300, 42) red←v7300 = (word) Idx2Byte←P240(r←v7212, (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+1) ), gamma←v4324); SOURCE(4344, 46) green←v7328 = (word) Idx2Byte←P240(g←v7168, (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+3) ), gamma←v4324) ; SOURCE(4392, 44) blue←v7356 = (word) Idx2Byte←P240(b←v7124, (* (( (ptr) (* (( (ptr) &var←c20544)+15)/* map←v6544 */ ))+5) ), gamma←v4324) ; SOURCE(4438, 50) { /*1*/ word var←c18784; /*1*/ var←c18784 = XR←NewObject(8, (* (( (ptr) gf←c20576)+16) )); /*1*/ (* (ptr) var←c18784 ) = (((word) (((word) (((word) BCK(pixel←v7256, 256) << 8) + (unsigned) (red←v7300 & 0377)) << 8) + /*1*/ (unsigned) (green←v7328 & 0377)) << 8) + (unsigned) (blue←v7356 & 0377)); /*1*/ (* (( (ptr) var←c18784)+1) ) = (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ); /*1*/ (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ) = var←c18784; /*1*/ }; }; }; }; if ((r←v7212 >= noName←c18752)) { goto lab←L100028; }; r←v7212 = (r←v7212 + 1); goto lab←L100031; lab←L100028: ; }; if ((g←v7168 >= noName←c18720)) { goto lab←L100024; }; g←v7168 = (g←v7168 + 1); goto lab←L100027; lab←L100024: ; }; if ((b←v7124 >= noName←c18688)) { goto lab←L100020; }; b←v7124 = (b←v7124 + 1); goto lab←L100023; lab←L100020: ; }; SOURCE(4520, 46) { word var←c18816; var←c18816 = XR←NewObject(8, (* (( (ptr) gf←c20576)+16) )); (* (bPt) var←c18816 ) = BCK(blackPixel←v4268, 256); (* (( (ptr) var←c18816)+1) ) = (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ); (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ) = var←c18816; }; SOURCE(4568, 52) { word var←c18848; var←c18848 = XR←NewObject(8, (* (( (ptr) gf←c20576)+16) )); (* (ptr) var←c18848 ) = (((word) BCK(whitePixel←v4296, 256) << 24) + 16777215); (* (( (ptr) var←c18848)+1) ) = (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ); (* (( (ptr) &var←c20544)+7)/* entries←v4396 */ ) = var←c18848; }; SOURCE(4622, 24) (void) TryAdding←P1416((* (ptr) &fc72 ), (* (ptr) &fc72 ), (* (ptr) &fc38 ), (word) (( (bPt) &var←c20544)+32)/* var←c18592 */ ) ; SOURCE(4708, 25) (void) TryAdding←P1416((* (ptr) &fc56 ), (* (ptr) &fc57 ), (* (ptr) &fc58 ), (word) (( (bPt) &var←c20544)+32)/* var←c18592 */ ) ; SOURCE(4755, 27) (void) TryAdding←P1416((* (ptr) &fc45 ), (* (ptr) &fc45 ), (* (ptr) &fc45 ), (word) (( (bPt) &var←c20544)+32)/* var←c18592 */ ) ; SOURCE(4791, 24) (void) TryAdding←P1416((* (ptr) &fc55 ), (* (ptr) &fc55 ), (* (ptr) &fc55 ), (word) (( (bPt) &var←c20544)+32)/* var←c18592 */ ) ; SOURCE(4824, 27) (void) TryAdding←P1416((* (ptr) &fc73 ), (* (ptr) &fc73 ), (* (ptr) &fc73 ), (word) (( (bPt) &var←c20544)+32)/* var←c18592 */ ) ; }; }; SOURCE(2183, 2668) return((* (( (ptr) &var←c20544)+7)/* entries←v4396 */ )); } static word SearchMaps←P1248(maps←v6620, vt←v6648, mustMatch←v6676, formal←c20608) word maps←v6620; word vt←v6648; word mustMatch←v6676; word formal←c20608; { word var←c6804; formal←c20608 = (formal←c20608 - 48); /* SearchMaps: */ SOURCE(2385, 392) SOURCE(2385, 392) var←c6804 = 0; SOURCE(2563, 214) { register word list←v7516; list←v7516 = maps←v6620; lab←L100035: ; if ((list←v7516 != 0)) { } else { goto lab←L100032; }; SOURCE(2649, 128) if (((* (( (ptr) (* (ptr) list←v7516 ))+8) ) == (* (ptr) vt←v6648 ))) { SOURCE(2689, 88) if ((mustMatch←v6676 == 0) || (mustMatch←v6676 == (* (ptr) (* (ptr) list←v7516 ) ))) { SOURCE(2757, 20) return((* (ptr) list←v7516 )); }; }; list←v7516 = (* (( (ptr) list←v7516)+1) ); goto lab←L100035; lab←L100032: ; }; SOURCE(2385, 392) return(var←c6804); } static word TryMap←P1308(mapKey←v6864, formal←c20672) word mapKey←v6864; word formal←c20672; { register ptr gf←c20640 = (ptr) &globalframe; word map←v6908; word maps←v7644; formal←c20672 = (formal←c20672 - 40); /* TryMap: */ SOURCE(2791, 274) SOURCE(2791, 274) map←v6908 = 0; SOURCE(2880, 6) { word pd74; pd74 = (* (( (ptr) (* (( (ptr) gf←c20640)+51)/* var←c18880 */ ))+4) ); maps←v7644 = (word) ( *( (fPt) ((* (ptr) pd74 ))))((* (( (ptr) (* (( (ptr) formal←c20672)+4) ))+16) ), (* (ptr) (* (( (ptr) formal←c20672)+4) ) ), mapKey←v6864, pd74); }; SOURCE(3015, 50) map←v6908 = (word) SearchMaps←P1248(maps←v7644, (* (( (ptr) formal←c20672)+5) ), (* (( (ptr) (* (( (ptr) formal←c20672)+4) ))+1) ), (word) (( (bPt) formal←c20672)+48)); SOURCE(2791, 274) return(map←v6908); } static void TryAdding←P1416(r←v7040, g←v7068, b←v7096, formal←c20768) word r←v7040; word g←v7068; word b←v7096; word formal←c20768; { W14 var←c20704; register ptr gf←c20736 = (ptr) &globalframe; formal←c20768 = (formal←c20768 - 32); (* (ptr) &var←c20704 ) = formal←c20768; /* TryAdding: */ SOURCE(3442, 17) SOURCE(3476, 600) SOURCE(3478, 554) if ((0 == (* (( (ptr) formal←c20768)+16) ))) { SOURCE(3500, 537) { /* declaration of rgb←v7400 skipped */ word pixel←v7428; /* declaration of var←c01 skipped */ /* declaration of var←c02 skipped */ /* declaration of var←c03 skipped */ /* declaration of var←c04 skipped */ SOURCE(3533, 46) (* (( (ptr) &var←c20704)+4) ) = (word) RealColorValToXColorVal←P120(r←v7040, (* (( (ptr) formal←c20768)+6) )); SOURCE(3582, 48) (* (( (ptr) &var←c20704)+5) ) = (word) RealColorValToXColorVal←P120(g←v7068, (* (( (ptr) formal←c20768)+6) )); SOURCE(3633, 47) (* (( (ptr) &var←c20704)+6) ) = (word) RealColorValToXColorVal←P120(b←v7096, (* (( (ptr) formal←c20768)+6) )); SOURCE(3682, 94) (* (( (ptr) &var←c20704)+7)/* var←c01 */ ) = (* (( (ptr) (* (( (ptr) formal←c20768)+4) ))+16) ); (* (( (ptr) &var←c20704)+8)/* var←c02 */ ) = (* (ptr) (* (( (ptr) formal←c20768)+15) ) ); (* (( (ptr) &var←c20704)+9)/* var←c03 */ ) = (* (( (ptr) (* (( (ptr) gf←c20736)+52)/* var←c18912 */ ))+190) ); { word var←c05; { word var←c0299; var←c0299 = (word) &var←c20704; var←c05 = (word) XR←Enable(( ((word) (fPt) NoName←Q3072) ), ( ((word) (fPt) NoName←Q3612) ), var←c0299); }; if ((var←c05 == 2)) { goto lab←L100036; }; }; pixel←v7428 = (* (W4Pt) (( (ptr) &var←c20704)+10)/* var←c04 */ ).f0; SOURCE(3794, 238) if ((pixel←v7428 < (* (( (ptr) formal←c20768)+14) ))) { SOURCE(3824, 101) { register word l←v7472; l←v7472 = (* (( (ptr) formal←c20768)+7) ); lab←L100042: ; if ((l←v7472 != 0)) { } else { goto lab←L100039; }; SOURCE(3888, 37) if (( (unsigned) (* (bPt) l←v7472 ) == pixel←v7428)) { SOURCE(3919, 6) return; }; l←v7472 = (* (( (ptr) l←v7472)+1) ); goto lab←L100042; lab←L100039: ; }; SOURCE(3967, 65) { word var←c18944; word var←c18976; word var←c19008; word var←c19040; var←c18944 = (word) ToByte←P300(r←v7040); var←c18976 = (word) ToByte←P300(g←v7068); var←c19008 = (word) ToByte←P300(b←v7096); var←c19040 = XR←NewObject(8, (* (( (ptr) gf←c20736)+16) )); (* (ptr) var←c19040 ) = (((word) (((word) (((word) BCK(pixel←v7428, 256) << 8) + (unsigned) (var←c18944 & 0377)) << 8) + (unsigned) (var←c18976 & 0377)) << 8) + (unsigned) (var←c19008 & 0377)); (* (( (ptr) var←c19040)+1) ) = (* (( (ptr) formal←c20768)+7) ); (* (( (ptr) formal←c20768)+7) ) = var←c19040; }; }; }; }; goto lab←L100043; lab←L100036: ; SOURCE(4055, 19) (* (( (ptr) formal←c20768)+16) ) = 1; lab←L100043: ; } static word NoName←Q3072(formal←c0271) word formal←c0271; { SOURCE(3682, 94) { word pd75; pd75 = (* (( (ptr) formal←c0271)+9) ); (void) ( *( (fPt) ((* (ptr) pd75 ))))((word) (( (bPt) formal←c0271)+40), (* (( (ptr) formal←c0271)+7) ), (* (( (ptr) formal←c0271)+8) ), (* (W3Pt) (( (ptr) formal←c0271)+4) ), pd75); }; return(0); } static word AllocateForDefaultColormap←P480(formal←c0323, formal←c0324, formal←c0325, formal←c0326, formal←c0327, formal←c0328, formal←c0329, formal←c0330) word formal←c0323; word formal←c0324; word formal←c0325; word formal←c0326; word formal←c0327; word formal←c0328; word formal←c0329; word formal←c0330; { W15 var←c20800; /* declaration of c←v4456 skipped */ /* declaration of colorMap←v4484 skipped */ /* declaration of blackPixel←v4512 skipped */ /* declaration of whitePixel←v4540 skipped */ /* declaration of invGamma←v4568 skipped */ /* declaration of reds←v4596 skipped */ /* declaration of greens←v4624 skipped */ /* declaration of blues←v4652 skipped */ word var←c4696; /* declaration of var←c19072 skipped */ (* (( (ptr) &var←c20800)+4)/* c←v4456 */ ) = formal←c0323; (* (( (ptr) &var←c20800)+5)/* colorMap←v4484 */ ) = formal←c0324; (* (( (ptr) &var←c20800)+6)/* blackPixel←v4512 */ ) = formal←c0325; (* (( (ptr) &var←c20800)+7)/* whitePixel←v4540 */ ) = formal←c0326; (* (( (ptr) &var←c20800)+8)/* invGamma←v4568 */ ) = formal←c0327; (* (( (ptr) &var←c20800)+9)/* reds←v4596 */ ) = formal←c0328; (* (( (ptr) &var←c20800)+10)/* greens←v4624 */ ) = formal←c0329; (* (( (ptr) &var←c20800)+11)/* blues←v4652 */ ) = formal←c0330; /* AllocateForDefaultColormap: */ SOURCE(4867, 1307) { word tmpAddr76; tmpAddr76 = (word) (( (ptr) &var←c20800)+12)/* var←c19072 */ ; (* (ptr) tmpAddr76 ) = ( ((word) (fPt) EachColor←P2004) ); (* (( (ptr) tmpAddr76) + 1) ) = 1; }; SOURCE(5076, 1098) SOURCE(5078, 38) { /* declaration of entries←v7772 skipped */ SOURCE(5078, 38) (* (( (ptr) &var←c20800)+14)/* entries←v7772 */ ) = 0; SOURCE(5124, 997) { word var←c010; { word var←c0300; var←c0300 = (word) &var←c20800; var←c010 = (word) XR←Enable(( ((word) (fPt) NoName←Q3132) ), ( ((word) (fPt) NoName←Q3432) ), var←c0300); }; if ((var←c010 == 5)) { goto lab←L100044; }; }; SOURCE(6128, 16) return((* (( (ptr) &var←c20800)+14)/* entries←v7772 */ )); }; /* c2c skipped dead code */ lab←L100044: ; SOURCE(6160, 12) return(0); } static word NoName←Q3132(formal←c0273) word formal←c0273; { register ptr gf←c0272 = (ptr) &globalframe; SOURCE(5528, 17) SOURCE(5939, 16) { word pd77; pd77 = (* (( (ptr) (* (( (ptr) gf←c0272)+52)/* var←c18912 */ ))+45) ); (void) ( *( (fPt) ((* (ptr) pd77 ))))((* (( (ptr) formal←c0273)+4) ), 0, pd77); }; SOURCE(5957, 42) (void) RampColors←P360((word) (( (bPt) formal←c0273)+48), (* (( (ptr) formal←c0273)+9) ), (* (( (ptr) formal←c0273)+10) ), (* ( ( (ptr) formal←c0273)+11) )); SOURCE(6001, 18) { word pd78; pd78 = (* (( (ptr) (* (( (ptr) gf←c0272)+52)/* var←c18912 */ ))+46) ); (void) ( *( (fPt) ((* (ptr) pd78 ))))((* (( (ptr) formal←c0273)+4) ), 0, pd78); }; SOURCE(6021, 46) { word var←c19136; var←c19136 = XR←NewObject(8, (* (( (ptr) gf←c0272)+16) )); { word idx79; (* (bPt) var←c19136 ) = ( idx79 = (* (( (ptr) formal←c0273)+6) ), BCK(idx79, 256) ); }; (* (( (ptr) var←c19136)+1) ) = (* (( (ptr) formal←c0273)+14) ); (* (( (ptr) formal←c0273)+14) ) = var←c19136; }; SOURCE(6069, 52) { word var←c19168; var←c19168 = XR←NewObject(8, (* (( (ptr) gf←c0272)+16) )); { word idx80; (* (ptr) var←c19168 ) = (((word) ( idx80 = (* (( (ptr) formal←c0273)+7) ), BCK(idx80, 256) ) << 24) + 16777215); }; (* (( (ptr) var←c19168)+1) ) = (* (( (ptr) formal←c0273)+14) ); (* (( (ptr) formal←c0273)+14) ) = var←c19168; }; return(0); } static word NoName←Q3192(formal←c0274) word formal←c0274; { SOURCE(5470, 33) { word pd81; pd81 = (* (( (ptr) formal←c0274)+5) ); (void) ( *( (fPt) ((* (ptr) pd81 ))))((* (( (ptr) (* (ptr) formal←c0274 ))+4) ), 0, pd81); }; return(0); } static word NoName←Q3252(formal←c0276) word formal←c0276; { register ptr gf←c0275 = (ptr) &globalframe; SOURCE(5378, 81) { word pd82; pd82 = (* (( (ptr) formal←c0276)+5) ); (void) ( *( (fPt) ((* (ptr) pd82 ))))((* (( (ptr) (* (ptr) formal←c0276 ))+4) ), (* (( (ptr) (* (ptr) formal←c0276 ))+5) ), (* (( (ptr) formal←c0276)+4) ), 0, (* (( (ptr) gf←c0275)+9)/* detailsForSynchronous←v2916 */ ), pd82); }; return(0); } static void EachColor←P2004(r←v8020, g←v8048, b←v8076, formal←c20864) word r←v8020; word g←v8048; word b←v8076; word formal←c20864; { register ptr gf←c20832 = (ptr) &globalframe; W3 rgb←v8104; word pixel←v8132; W4 var←c0138; formal←c20864 = (formal←c20864 - 48); /* EachColor: */ SOURCE(5528, 17) SOURCE(5595, 46) rgb←v8104.f0 = (word) RealColorValToXColorVal←P120(r←v8020, (* (( (ptr) formal←c20864)+8) )); SOURCE(5644, 48) rgb←v8104.f1 = (word) RealColorValToXColorVal←P120(g←v8048, (* (( (ptr) formal←c20864)+8) )); SOURCE(5695, 47) rgb←v8104.f2 = (word) RealColorValToXColorVal←P120(b←v8076, (* (( (ptr) formal←c20864)+8) )); SOURCE(5744, 65) { word pd83; pd83 = (* (( (ptr) (* (( (ptr) gf←c20832)+52)/* var←c18912 */ ))+190) ); (void) ( *( (fPt) ((* (ptr) pd83 ))))((word) &var←c0138, (* (( (ptr) formal←c20864)+4) ), (* (( (ptr) formal←c20864)+5) ), rgb←v8104, pd83) ; }; pixel←v8132 = var←c0138.f0; SOURCE(5850, 84) if ((pixel←v8132 <= 255)) { SOURCE(5869, 65) { word var←c19200; word var←c19232; word var←c19264; word var←c19296; var←c19200 = (word) ToByte←P300(r←v8020); var←c19232 = (word) ToByte←P300(g←v8048); var←c19264 = (word) ToByte←P300(b←v8076); var←c19296 = XR←NewObject(8, (* (( (ptr) gf←c20832)+16) )); (* (ptr) var←c19296 ) = (((word) (((word) (((word) BCK(pixel←v8132, 256) << 8) + (unsigned) (var←c19200 & 0377)) << 8) + (unsigned) (var←c19232 & 0377)) << 8) + (unsigned) (var←c19264 & 0377)); (* (( (ptr) var←c19296)+1) ) = (* (( (ptr) formal←c20864)+14) ); (* (( (ptr) formal←c20864)+14) ) = var←c19296; }; }; } static word AllocateForNewColormap←P540(c←v4756, colorMap←v4784, formal←c0331, formal←c0332, formal←c0333, reds←v4896, greens←v4924, blues←v4952, formal←c0334) word c←v4756; word colorMap←v4784; word formal←c0331; word formal←c0332; word formal←c0333; word reds←v4896; word greens←v4924; word blues←v4952; word formal←c0334; { W15 var←c20896; /* declaration of blackPixel←v4812 skipped */ /* declaration of whitePixel←v4840 skipped */ /* declaration of invGamma←v4868 skipped */ /* declaration of pixelCount←v4980 skipped */ register ptr gf←c20928 = (ptr) &globalframe; word var←c5024; /* declaration of var←c19328 skipped */ /* declaration of var←c19360 skipped */ /* declaration of entries←v8176 skipped */ /* declaration of storeColorItems←v8204 skipped */ /* declaration of nextFreePixel←v8232 skipped */ (* (( (ptr) &var←c20896)+4)/* blackPixel←v4812 */ ) = formal←c0331; (* (( (ptr) &var←c20896)+5)/* whitePixel←v4840 */ ) = formal←c0332; (* (( (ptr) &var←c20896)+6)/* invGamma←v4868 */ ) = formal←c0333; (* (( (ptr) &var←c20896)+7)/* pixelCount←v4980 */ ) = formal←c0334; /* AllocateForNewColormap: */ SOURCE(6178, 1501) { word tmpAddr84; tmpAddr84 = (word) (( (ptr) &var←c20896)+8)/* var←c19328 */ ; (* (ptr) tmpAddr84 ) = ( ((word) (fPt) EachColor←P2124) ); (* (( (ptr) tmpAddr84) + 1) ) = 1; }; { word tmpAddr85; tmpAddr85 = (word) (( (ptr) &var←c20896)+10)/* var←c19360 */ ; (* (ptr) tmpAddr85 ) = ( ((word) (fPt) NextPixel←P2064) ); (* (( (ptr) tmpAddr85) + 1) ) = 1; }; SOURCE(6411, 38) (* (( (ptr) &var←c20896)+12)/* entries←v8176 */ ) = 0; SOURCE(6451, 17) (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ) = 0; SOURCE(6496, 22) (* (( (ptr) &var←c20896)+14)/* nextFreePixel←v8232 */ ) = 0; SOURCE(7145, 42) (void) RampColors←P360((word) (( (bPt) &var←c20896)+32)/* var←c19328 */ , reds←v4896, greens←v4924, blues←v4952); SOURCE(7189, 300) { W7 w←v8592; W7 b←v8620; SOURCE(7195, 107) w←v8592.f0 = (* (( (ptr) &var←c20896)+5)/* whitePixel←v4840 */ ); w←v8592.f1 = 1; w←v8592.f2 = 1; w←v8592.f3 = 1; w←v8592.f4 = 65535; w←v8592.f5 = 65535; w←v8592.f6 = 65535; SOURCE(7304, 95) b←v8620.f0 = (* (( (ptr) &var←c20896)+4)/* blackPixel←v4812 */ ); b←v8620.f1 = 1; b←v8620.f2 = 1; b←v8620.f3 = 1; b←v8620.f4 = 0; b←v8620.f5 = 0; b←v8620.f6 = 0; SOURCE(7401, 42) { word var←c19456; var←c19456 = XR←NewObject(32, (* (( (ptr) gf←c20928)+18) )); (* (W7Pt) var←c19456 ) = w←v8592; (* (( (ptr) var←c19456)+7) ) = (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ); (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ) = var←c19456; }; SOURCE(7445, 42) { word var←c19488; var←c19488 = XR←NewObject(32, (* (( (ptr) gf←c20928)+18) )); (* (W7Pt) var←c19488 ) = b←v8620; (* (( (ptr) var←c19488)+7) ) = (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ); (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ) = var←c19488; }; }; SOURCE(7494, 46) { word var←c19520; var←c19520 = XR←NewObject(8, (* (( (ptr) gf←c20928)+16) )); { word idx86; (* (bPt) var←c19520 ) = ( idx86 = (* (( (ptr) &var←c20896)+4)/* blackPixel←v4812 */ ), BCK(idx86, 256) ); }; (* (( (ptr) var←c19520)+1) ) = (* (( (ptr) &var←c20896)+12)/* entries←v8176 */ ); (* (( (ptr) &var←c20896)+12)/* entries←v8176 */ ) = var←c19520; }; SOURCE(7542, 52) { word var←c19552; var←c19552 = XR←NewObject(8, (* (( (ptr) gf←c20928)+16) )); { word idx87; (* (ptr) var←c19552 ) = (((word) ( idx87 = (* (( (ptr) &var←c20896)+5)/* whitePixel←v4840 */ ), BCK(idx87, 256) ) << 24) + 16777215); }; (* (( (ptr) var←c19552)+1) ) = (* (( (ptr) &var←c20896)+12)/* entries←v8176 */ ); (* (( (ptr) &var←c20896)+12)/* entries←v8176 */ ) = var←c19552; }; SOURCE(7596, 64) { word pd88; pd88 = (* (( (ptr) (* (( (ptr) gf←c20928)+52)/* var←c18912 */ ))+195) ); (void) ( *( (fPt) ((* (ptr) pd88 ))))(c←v4756, colorMap←v4784, (* (( (ptr) &var←c20896)+13)/* storeColorItems←v8204 */ ), 0, pd88) ; }; SOURCE(7662, 17) return((* (( (ptr) &var←c20896)+12)/* entries←v8176 */ )); } static word NextPixel←P2064(formal←c20960) word formal←c20960; { word this←v8448; formal←c20960 = (formal←c20960 - 40); /* NextPixel: */ SOURCE(6543, 156) SOURCE(6586, 20) this←v8448 = (* (( (ptr) formal←c20960)+14) ); SOURCE(6608, 67) lab←L100061: ; if ((this←v8448 == (* (( (ptr) formal←c20960)+4) )) || (this←v8448 == (* (( (ptr) formal←c20960)+5) ))) { } else { goto lab←L100059; }; SOURCE(6654, 21) this←v8448 = (this←v8448 + 1); goto lab←L100061; lab←L100059: ; SOURCE(6677, 22) (* (( (ptr) formal←c20960)+14) ) = (this←v8448 + 1); SOURCE(6543, 156) return(this←v8448); } static void EachColor←P2124(r←v8508, g←v8536, b←v8564, formal←c21024) word r←v8508; word g←v8536; word b←v8564; word formal←c21024; { register ptr gf←c20992 = (ptr) &globalframe; W3 rgb←v8664; word pixel←v8692; formal←c21024 = (formal←c21024 - 32); /* EachColor: */ SOURCE(6705, 432) SOURCE(6758, 27) pixel←v8692 = (word) NextPixel←P2064((word) ((( (bPt) formal←c21024)+40))); SOURCE(6787, 350) if ((pixel←v8692 < (* (( (ptr) formal←c21024)+7) ))) { SOURCE(6814, 46) rgb←v8664.f0 = (word) RealColorValToXColorVal←P120(r←v8508, (* (( (ptr) formal←c21024)+6) )); SOURCE(6863, 48) rgb←v8664.f1 = (word) RealColorValToXColorVal←P120(g←v8536, (* (( (ptr) formal←c21024)+6) )); SOURCE(6914, 47) rgb←v8664.f2 = (word) RealColorValToXColorVal←P120(b←v8564, (* (( (ptr) formal←c21024)+6) )); SOURCE(6963, 107) { word var←c19584; var←c19584 = XR←NewObject(32, (* (( (ptr) gf←c20992)+18) )); (* (ptr) var←c19584 ) = pixel←v8692; (* (( (ptr) var←c19584)+1) ) = 1; (* (( (ptr) var←c19584)+2) ) = 1; (* (( (ptr) var←c19584)+3) ) = 1; (* (W3Pt) (( (ptr) var←c19584)+4) ) = rgb←v8664; (* (( (ptr) var←c19584)+7) ) = (* (( (ptr) formal←c21024)+13) ); (* (( (ptr) formal←c21024)+13) ) = var←c19584; }; SOURCE(7072, 65) { word var←c19616; word var←c19648; word var←c19680; word var←c19712; var←c19616 = (word) ToByte←P300(r←v8508); var←c19648 = (word) ToByte←P300(g←v8536); var←c19680 = (word) ToByte←P300(b←v8564); var←c19712 = XR←NewObject(8, (* (( (ptr) gf←c20992)+16) )); (* (ptr) var←c19712 ) = (((word) (((word) (((word) BCK(pixel←v8692, 256) << 8) + (unsigned) (var←c19616 & 0377)) << 8) + (unsigned) (var←c19648 & 0377)) << 8) + (unsigned) (var←c19680 & 0377)); (* (( (ptr) var←c19712)+1) ) = (* (( (ptr) formal←c21024)+12) ); (* (( (ptr) formal←c21024)+12) ) = var←c19712; }; }; } static void FindBlackAndWhite←P600(formal←c0193, formal←c0335, vt←v5112) word formal←c0193; word formal←c0335; word vt←v5112; { W24 var←c21056; /* declaration of screen←v5084 skipped */ register ptr gf←c21088 = (ptr) &globalframe; /* declaration of blackPixel←v5156 skipped */ /* declaration of whitePixel←v5184 skipped */ /* declaration of var←c19744 skipped */ /* declaration of var←c19776 skipped */ /* declaration of colorMapSize←v8792 skipped */ /* declaration of colormap←v8820 skipped */ /* declaration of c←v8848 skipped */ /* declaration of used←v8876 skipped */ /* declaration of lastAlloc←v8904 skipped */ /* declaration of found←v8932 skipped */ (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ) = formal←c0335; /* FindBlackAndWhite: */ SOURCE(7683, 2095) { word tmpAddr89; tmpAddr89 = (word) (( (ptr) &var←c21056)+7)/* var←c19744 */ ; (* (ptr) tmpAddr89 ) = ( ((word) (fPt) ReturnEm←P2412) ); (* (( (ptr) tmpAddr89) + 1) ) = 1; }; { word tmpAddr90; tmpAddr90 = (word) (( (ptr) &var←c21056)+9)/* var←c19776 */ ; (* (ptr) tmpAddr90 ) = ( ((word) (fPt) GrabEm←P2352) ); (* (( (ptr) tmpAddr90) + 1) ) = 1; }; SOURCE(7970, 49) { word x91; (* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) = (x91 = (* (( (ptr) vt←v5112)+3) ), MIN( (unsigned) , x91, 256)); }; SOURCE(8022, 46) (* (( (ptr) &var←c21056)+12)/* colormap←v8820 */ ) = (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+1) ); SOURCE(8070, 36) (* (( (ptr) &var←c21056)+13)/* c←v8848 */ ) = (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+16) ); SOURCE(8108, 48) XR←FillWords(&(* (W8Pt) ((( (ptr) &var←c21056)+14)/* used←v8876 */ )), 8, 0); SOURCE(8158, 32) (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ ) = (word) -1; SOURCE(8192, 19) (* (( (ptr) &var←c21056)+23)/* found←v8932 */ ) = 0; SOURCE(8979, 30) (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ) = (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+3) ); SOURCE(9011, 23) { word idx92; word xs93; xs93 = (word) ( idx92 = (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ), BCK(idx92, 256) ); (* (ptr) (( (ptr) (( (bPt) &var←c21056)+56)/* used←v8876 */ ) + ((word) xs93 >> 5)) ) |= ((unsigned) 1 << 32 - ((word) (xs93 & 037)+1) ); }; SOURCE(9036, 30) (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ) = (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+2) ); SOURCE(9068, 23) { word idx94; word xs95; xs95 = (word) ( idx94 = (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ), BCK(idx94, 256) ); (* (ptr) (( (ptr) (( (bPt) &var←c21056)+56)/* used←v8876 */ ) + ((word) xs95 >> 5)) ) |= ((unsigned) 1 << 32 - ((word) (xs95 & 037)+1) ); }; SOURCE(9093, 63) { word ix96; if (( ix96 = (((* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) - (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ )) - 1), ((* (ptr) (( (ptr) (( (bPt) &var←c21056)+56)/* used←v8876 */ ) + ((word) ix96 >> 5)) ) >> (31 - ((word) (ix96 & 037)))) & 1 )) { SOURCE(9125, 31) /* removed bogus assignment */ /* removed bogus assignment */ goto lab←L100062; }; }; SOURCE(9158, 8) (void) GrabEm←P2352((word) ((( (bPt) &var←c21056)+36)/* var←c19776 */ )); SOURCE(9168, 348) if ( ( (0 != (* (( (ptr) &var←c21056)+23)/* found←v8932 */ )) ? ((* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ ) < (* ( ( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ )) : 0 ) ) { SOURCE(9211, 305) { word ix97; if (( ix97 = (((* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) - (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ )) - 1), ((* (ptr) (( (ptr) (( (bPt) &var←c21056)+56)/* used←v8876 */ ) + ((word) ix97 >> 5)) ) >> (31 - ((word) (ix97 & 037)))) & 1 )) { if (((((* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) - (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ )) - 1) == (* ( ( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+2) ))) { SOURCE(9358, 22) (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ) = (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ ); } else { if (((((* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) - (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ )) - 1) == (* ( ( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+3) ))) { SOURCE(9423, 22) (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ) = (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ ); } else { SOURCE(9459, 22) (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ) = (* (( (ptr) &var←c21056)+22)/* lastAlloc←v8904 */ ); SOURCE(9484, 32) (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ) = (((* (( (ptr) &var←c21056)+11)/* colorMapSize←v8792 */ ) - (* (( (ptr) &var←c21056)+22) /* lastAlloc←v8904 */ )) - 1); }; }; }; }; }; SOURCE(9525, 10) (void) ReturnEm←P2412((word) ((( (bPt) &var←c21056)+28)/* var←c19744 */ )); SOURCE(9537, 114) if (((* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ) != (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+3) ))) { SOURCE(9575, 76) { word var←c19840; { word var←c19872; word var←c19904; var←c19872 = XR←NewObject(32, (* (( (ptr) gf←c21088)+18) )); var←c19904 = var←c19872; (* (ptr) var←c19904 ) = (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ); (* (( (ptr) var←c19904)+1) ) = 1; (* (( (ptr) var←c19904)+2) ) = 1; (* (( (ptr) var←c19904)+3) ) = 1; var←c19840 = var←c19872; }; { word pd98; pd98 = (* (( (ptr) (* (( (ptr) gf←c21088)+52)/* var←c18912 */ ))+195) ); (void) ( *( (fPt) ((* (ptr) pd98 ))))((* (( (ptr) &var←c21056)+13)/* c←v8848 */ ), (* (( (ptr) &var←c21056)+12)/* colormap←v8820 */ ), var←c19840, 0, pd98) ; }; }; }; SOURCE(9653, 125) if (((* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ) != (* (( (ptr) (* (( (ptr) &var←c21056)+4)/* screen←v5084 */ ))+2) ))) { SOURCE(9690, 88) { word var←c19936; { word var←c19968; word var←c20000; var←c19968 = XR←NewObject(32, (* (( (ptr) gf←c21088)+18) )); var←c20000 = var←c19968; (* (ptr) var←c20000 ) = (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ); (* (( (ptr) var←c20000)+1) ) = 1; (* (( (ptr) var←c20000)+2) ) = 1; (* (( (ptr) var←c20000)+3) ) = 1; (* (( (ptr) var←c20000)+4) ) = 65535; (* (( (ptr) var←c20000)+5) ) = 65535; (* (( (ptr) var←c20000)+6) ) = 65535; var←c19936 = var←c19968; }; { word pd99; pd99 = (* (( (ptr) (* (( (ptr) gf←c21088)+52)/* var←c18912 */ ))+195) ); (void) ( *( (fPt) ((* (ptr) pd99 ))))((* (( (ptr) &var←c21056)+13)/* c←v8848 */ ), (* (( (ptr) &var←c21056)+12)/* colormap←v8820 */ ), var←c19936, 0, pd99) ; }; }; }; /* removed tail goto */ lab←L100062: ; (* (ptr) formal←c0193 ) = (* (( (ptr) &var←c21056)+5)/* blackPixel←v5156 */ ); (* (( (ptr) formal←c0193)+1) ) = (* (( (ptr) &var←c21056)+6)/* whitePixel←v5184 */ ); return; } static void GrabEm←P2352(formal←c21184) word formal←c21184; { W7 var←c21120; register ptr gf←c21152 = (ptr) &globalframe; formal←c21184 = (formal←c21184 - 36); var←c21120.f0 = formal←c21184; /* GrabEm: */ SOURCE(8213, 405) SOURCE(8231, 387) SOURCE(8233, 16) { word pd100; pd100 = (* (( (ptr) (* (( (ptr) gf←c21152)+52)/* var←c18912 */ ))+45) ); (void) ( *( (fPt) ((* (ptr) pd100 ))))((* (( (ptr) formal←c21184)+13) ), 0, pd100); }; SOURCE(8251, 330) { register word i←v9308 = 0; register word noName←c20032; noName←c20032 = (* (( (ptr) formal←c21184)+11) ); if ((i←v9308 >= noName←c20032)) { goto lab←L100064; }; lab←L100067: ; { word pixels←v9352 = 0; /* declaration of var←c011 skipped */ /* declaration of var←c012 skipped */ SOURCE(8317, 68) var←c21120.f4/* var←c011 */ = (* (( (ptr) (* (( (ptr) gf←c21152)+52)/* var←c18912 */ ))+192) ); { word var←c013; { word var←c0301; var←c0301 = (word) &var←c21120; var←c013 = (word) XR←Enable(( ((word) (fPt) NoName←Q3312) ), ( ((word) (fPt) NoName←Q3372) ), var←c0301); }; if ((var←c013 == 6)) { goto lab←L100063; }; }; pixels←v9352 = (* (W2Pt) (( (ptr) &var←c21120)+5)/* var←c012 */ ).f0; SOURCE(8408, 145) if ((pixels←v9352 != 0)) { SOURCE(8429, 124) { register word k←v9408 = 0; register word noName←c20064; noName←c20064 = (* (ptr) pixels←v9352 ); if ((k←v9408 >= noName←c20064)) { goto lab←L100070; }; lab←L100073: ; SOURCE(8463, 21) { word limit101; (* (( (ptr) formal←c21184)+22) ) = (* ((( (ptr) pixels←v9352)+1)+( limit101 = (* (ptr) pixels←v9352 ), BCK(k←v9408, limit101) )) ); }; SOURCE(8486, 22) { word idx102; word xs103; xs103 = (word) ( idx102 = (* (( (ptr) formal←c21184)+22) ), BCK(idx102, 256) ); (* (ptr) (( (ptr) (( (bPt) formal←c21184)+56)) + ((word) xs103 >> 5)) ) |= ((unsigned) 1 << 32 - ((word) (xs103 & 037)+1) ); }; SOURCE(8510, 43) { word ix104; if (( ix104 = (((* (( (ptr) formal←c21184)+11) ) - (* (( (ptr) formal←c21184)+22) )) - 1), ((* (ptr) (( (ptr) (( (bPt) formal←c21184)+56)) + ((word) ix104 >> 5)) ) >> (31 - ((word) (ix104 & 037)))) & 1 )) { SOURCE(8541, 12) (* (( (ptr) formal←c21184)+23) ) = 1; }; }; k←v9408 = (k←v9408 + 1); if ((k←v9408 < noName←c20064)) { goto lab←L100073; }; lab←L100070: ; }; }; SOURCE(8567, 14) if ((0 != (* (( (ptr) formal←c21184)+23) ))) { SOURCE(8581, 4) goto lab←L100065; }; }; i←v9308 = (i←v9308 + 1); if ((i←v9308 < noName←c20032)) { goto lab←L100067; }; lab←L100064: ; lab←L100065: ; }; goto lab←L100074; lab←L100063: ; lab←L100074: ; } static word NoName←Q3312(formal←c0286) word formal←c0286; { SOURCE(8317, 68) { word pd105; pd105 = (* (( (ptr) formal←c0286)+4) ); (void) ( *( (fPt) ((* (ptr) pd105 ))))((word) (( (bPt) formal←c0286)+20), (* (( (ptr) (* (ptr) formal←c0286 ))+13) ), (* ( ( (ptr) (* (ptr) formal←c0286 ))+12) ), 1, 0, 0, pd105); }; return(0); } static void ReturnEm←P2412(formal←c21248) word formal←c21248; { register ptr gf←c21216 = (ptr) &globalframe; word pixelsToFree←v9452 = 0; formal←c21248 = (formal←c21248 - 28); /* ReturnEm: */ SOURCE(8621, 353) SOURCE(8679, 24) { word idx106; word xs107; xs107 = (word) ( idx106 = (* (( (ptr) formal←c21248)+5) ), BCK(idx106, 256) ); (* (ptr) (( (ptr) (( (bPt) formal←c21248)+56)) + ((word) xs107 >> 5)) ) &= ~((unsigned) 1 << 32 - ((word) (xs107 & 037)+1) ); }; SOURCE(8705, 24) { word idx108; word xs109; xs109 = (word) ( idx108 = (* (( (ptr) formal←c21248)+6) ), BCK(idx108, 256) ); (* (ptr) (( (ptr) (( (bPt) formal←c21248)+56)) + ((word) xs109 >> 5)) ) &= ~((unsigned) 1 << 32 - ((word) (xs109 & 037)+1) ); }; SOURCE(8731, 31) { word idx110; word xs111; xs111 = (word) ( idx110 = (* (( (ptr) (* (( (ptr) formal←c21248)+4) ))+3) ), BCK(idx110, 256) ); (* (ptr) (( (ptr) (( (bPt) formal←c21248)+56)) + ((word) xs111 >> 5)) ) &= ~((unsigned) 1 << 32 - ((word) (xs111 & 037)+1) ); }; SOURCE(8764, 31) { word idx112; word xs113; xs113 = (word) ( idx112 = (* (( (ptr) (* (( (ptr) formal←c21248)+4) ))+2) ), BCK(idx112, 256) ); (* (ptr) (( (ptr) (( (bPt) formal←c21248)+56)) + ((word) xs113 >> 5)) ) &= ~((unsigned) 1 << 32 - ((word) (xs113 & 037)+1) ); }; SOURCE(8797, 78) { register word i←v9580 = 0; lab←L100078: ; SOURCE(8823, 52) { word ix114; if (( ix114 = BCK(i←v9580, 256), ((* (ptr) (( (ptr) (( (bPt) formal←c21248)+56)) + ((word) ix114 >> 5)) ) >> (31 - ((word) (ix114 & 037)))) & 1 )) { SOURCE(8839, 36) { word var←c20096; var←c20096 = XR←NewObject(8, (* (( (ptr) gf←c21216)+17) )); (* (ptr) var←c20096 ) = i←v9580; (* (( (ptr) var←c20096)+1) ) = pixelsToFree←v9452; pixelsToFree←v9452 = var←c20096; }; }; }; if ((i←v9580 >= 255)) { goto lab←L100075; }; i←v9580 = (i←v9580 + 1); goto lab←L100078; lab←L100075: ; }; SOURCE(8886, 68) if ((pixelsToFree←v9452 != 0)) { SOURCE(8911, 43) { word pd115; pd115 = (* (( (ptr) (* (( (ptr) gf←c21216)+52)/* var←c18912 */ ))+194) ); (void) ( *( (fPt) ((* (ptr) pd115 ))))((* (( (ptr) formal←c21248)+13) ), (* (( (ptr) formal←c21248)+12) ), pixelsToFree←v9452, 0, 0, pd115) ; }; }; SOURCE(8956, 18) { word pd116; pd116 = (* (( (ptr) (* (( (ptr) gf←c21216)+52)/* var←c18912 */ ))+46) ); (void) ( *( (fPt) ((* (ptr) pd116 ))))((* (( (ptr) formal←c21248)+13) ), 0, pd116); }; } static word Access←P660(screen←v5244, depth←v5272, class←v5300) word screen←v5244; word depth←v5272; word class←v5300; { W7 var←c21280; register ptr gf←c21312 = (ptr) &globalframe; /* declaration of cd←v5344 skipped */ /* declaration of var←c20128 skipped */ word a←v9680; word vt←v9708; /* Access: */ SOURCE(9784, 799) { word tmpAddr117; tmpAddr117 = (word) (( (ptr) &var←c21280)+5)/* var←c20128 */ ; (* (ptr) tmpAddr117 ) = ( ((word) (fPt) Protected←P2664) ); (* (( (ptr) tmpAddr117) + 1) ) = 1; }; SOURCE(9784, 799) var←c21280.f4/* cd←v5344 */ = 0; SOURCE(10206, 56) vt←v9708 = (word) FindVisualType←P60(screen←v5244, depth←v5272, class←v5300); SOURCE(10264, 27) if ((vt←v9708 == 0)) { SOURCE(10279, 12) return(0); }; SOURCE(10293, 17) a←v9680 = (word) Protected←P2664(vt←v9708, (word) (( (bPt) &var←c21280)+20)/* var←c20128 */ ); SOURCE(10312, 103) if ((a←v9680 == 1)) { SOURCE(10329, 86) { register word i←v9956; i←v9956 = 0; lab←L100082: ; if ( ( ( (int)i←v9956 < (int)50) ? (a←v9680 == 1) : 0 ) ) { } else { goto lab←L100079; }; SOURCE(10374, 22) { word pd118; pd118 = (* (( (ptr) (* (( (ptr) gf←c21312)+53)/* var←c20160 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd118 ))))(100, pd118); }; SOURCE(10398, 17) a←v9680 = (word) Protected←P2664(vt←v9708, (word) (( (bPt) &var←c21280)+20)/* var←c20128 */ ); i←v9956 = (i←v9956 + 1); goto lab←L100082; lab←L100079: ; }; }; SOURCE(10429, 154) { word var←c20192; var←c20192 = a←v9680; switch (var←c20192) { case 0: SOURCE(10452, 11) return(var←c21280.f4/* cd←v5344 */ ); case 2: SOURCE(10480, 30) var←c21280.f4/* cd←v5344 */ = (word) ColorDataInit←P780(screen←v5244, vt←v9708); SOURCE(10513, 11) return(var←c21280.f4/* cd←v5344 */ ); case 1: SOURCE(10539, 30) var←c21280.f4/* cd←v5344 */ = (word) ColorDataInit←P780(screen←v5244, vt←v9708); SOURCE(10572, 11) return(var←c21280.f4/* cd←v5344 */ ); default: SOURCE(10599, 5) (void) XR←RaiseUnnamedError(); break; }; }; } static word Protected←P2664(vt←v9884, formal←c21376) word vt←v9884; word formal←c21376; { register ptr gf←c21344 = (ptr) &globalframe; word var←c9928; formal←c21376 = (formal←c21376 - 20); /* Protected: */ SOURCE(9930, 256) (void) (XR←MonitorEntry((word) (( (bPt) gf←c21344)+16)/* LOCK←v2748 */ )); SOURCE(9993, 193) { word var←c20224; word var←c20256; { word pd119; pd119 = (* (( (ptr) (* (( (ptr) gf←c21344)+52)/* var←c18912 */ ))+35) ); var←c20224 = (word) ( *( (fPt) ((* (ptr) pd119 ))))(vt←v9884, (* (( (ptr) gf←c21344)+8)/* myKey←v2776 */ ), pd119); }; if ((var←c20224 == 0)) { goto lab←L100083; }; var←c20256 = XR←GetReferentType(var←c20224); if (((* (( (ptr) gf←c21344)+19) ) == var←c20256)) { { word d←v10000; d←v10000 = var←c20224; SOURCE(10059, 6) (* (( (ptr) formal←c21376)+4) ) = d←v10000; SOURCE(10067, 12) (void) (XR←MonitorExit((word) (( (bPt) gf←c21344)+16)/* LOCK←v2748 */ )); return(0); }; } else { if (((* (( (ptr) gf←c21344)+20) ) == var←c20256)) { { word a←v10044; a←v10044 = var←c20224; SOURCE(10093, 13) (void) (XR←MonitorExit((word) (( (bPt) gf←c21344)+16)/* LOCK←v2748 */ )); return(1); }; } else { lab←L100083: ; SOURCE(10121, 48) { word pd120; pd120 = (* (( (ptr) (* (( (ptr) gf←c21344)+52)/* var←c18912 */ ))+34) ); (void) ( *( (fPt) ((* (ptr) pd120 ))))(vt←v9884, (* (( (ptr) gf←c21344)+8)/* myKey←v2776 */ ), (* (( (ptr) gf←c21344)+22) ), pd120); }; SOURCE(10171, 15) (void) (XR←MonitorExit((word) (( (bPt) gf←c21344)+16)/* LOCK←v2748 */ )); return(2); }; }; }; } static word NewCD←P720(screen←v5404) word screen←v5404; { register ptr gf←c21408 = (ptr) &globalframe; word var←c5448; word cd←v10088; /* NewCD: */ SOURCE(10610, 282) SOURCE(10673, 40) cd←v10088 = XR←NewObject(28, (* (( (ptr) gf←c21408)+19) )); SOURCE(10715, 44) (* (( (ptr) cd←v10088)+1) ) = 0; (* (ptr) cd←v10088 ) = 0; SOURCE(10761, 36) (* (( (ptr) cd←v10088)+2) ) = (* (( (ptr) screen←v5404)+1) ); SOURCE(10799, 39) (* (( (ptr) cd←v10088)+3) ) = (* (( (ptr) screen←v5404)+3) ); SOURCE(10840, 39) (* (( (ptr) cd←v10088)+4) ) = (* (( (ptr) screen←v5404)+2) ); SOURCE(10881, 11) return(cd←v10088); } static word ColorDataInit←P780(screen←v5520, vt←v5548) word screen←v5520; word vt←v5548; { register ptr gf←c21440 = (ptr) &globalframe; word cd←v5592; /* ColorDataInit: */ SOURCE(10898, 2200) SOURCE(10898, 2200) cd←v5592 = 0; SOURCE(10992, 18) cd←v5592 = (word) NewCD←P720(screen←v5520); SOURCE(11012, 2046) if ((vt←v5548 != 0)) { SOURCE(11027, 2033) { word invGamma←v10144; word gamma←v10172; SOURCE(11029, 26) invGamma←v10144 = (* (ptr) &fc121 ); SOURCE(11057, 17) gamma←v10172 = (* (ptr) &fc122 ); SOURCE(11076, 29) (* (( (ptr) cd←v5592)+1) ) = 0; SOURCE(11107, 74) { W2 var←c20320; (void) FindBlackAndWhite←P600((word) &var←c20320, screen←v5520, vt←v5548); (* (( (ptr) cd←v5592)+4) ) = var←c20320.f1; (* (( (ptr) cd←v5592)+3) ) = var←c20320.f0; }; SOURCE(11183, 107) (* (( (ptr) cd←v5592)+5) ) = (word) TryWithStandardColorMap←P420(screen←v5520, vt←v5548, (* (( (ptr) cd←v5592)+3) ), (* ( ( (ptr) cd←v5592)+4) ), gamma←v10172, invGamma←v10144); SOURCE(11292, 1741) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { if (((* (( (ptr) vt←v5548)+3) ) > 255)) { SOURCE(11365, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 5 , 6, 4); SOURCE(11499, 791) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(11524, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 4 , 5, 4); SOURCE(11658, 632) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(11683, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 4 , 4, 4); SOURCE(11817, 473) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(11842, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 4 , 4, 3); SOURCE(11976, 314) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(12001, 28) (* (( (ptr) cd←v5592)+1) ) = 1; SOURCE(12031, 109) { /*1*/ word pd123; /*1*/ pd123 = (* (( (ptr) (* (( (ptr) gf←c21440)+52)/* var←c18912 */ ))+184) ); /*1*/ (* (( (ptr) cd←v5592)+2) ) = (word) ( *( (fPt) ((* (ptr) pd123 ))))((* (( (ptr) screen←v5520)+16) ), (* (ptr) vt←v5548 ), (* (ptr) screen←v5520 ), 1, 0, pd123) /*1*/ ; /*1*/ }; SOURCE(12142, 148) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForNewColormap←P540((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) /*1*/ ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 5 /*1*/ , 6, 4, (* (( (ptr) vt←v5548)+3) )); }; }; }; }; } else { if (((* (( (ptr) vt←v5548)+3) ) > 15)) { SOURCE(12334, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 2 , 3, 2); SOURCE(12468, 473) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(12493, 132) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForDefaultColormap←P480((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 2 , 2, 2); SOURCE(12627, 314) if (((* (( (ptr) cd←v5592)+5) ) == 0)) { SOURCE(12652, 28) (* (( (ptr) cd←v5592)+1) ) = 1; SOURCE(12682, 109) { word pd124; pd124 = (* (( (ptr) (* (( (ptr) gf←c21440)+52)/* var←c18912 */ ))+184) ); (* (( (ptr) cd←v5592)+2) ) = (word) ( *( (fPt) ((* (ptr) pd124 ))))((* (( (ptr) screen←v5520)+16) ), (* (ptr) vt←v5548 ), (* (ptr) screen←v5520 ), 1, 0, pd124) ; }; SOURCE(12793, 148) (* (( (ptr) cd←v5592)+5) ) = (word) AllocateForNewColormap←P540((* (( (ptr) screen←v5520)+16) ), (* (( (ptr) cd←v5592)+2) ), (* (( (ptr) cd←v5592)+3) ), (* (( (ptr) cd←v5592)+4) ), invGamma←v10144, 2 , 3, 2, (* (( (ptr) vt←v5548)+3) )); }; }; } else { SOURCE(12965, 20) (* (ptr) cd←v5592 ) = 0; SOURCE(12988, 35) { word pd125; pd125 = (* (( (ptr) (* (( (ptr) gf←c21440)+52)/* var←c18912 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd125 ))))(screen←v5520, (* (( (ptr) gf←c21440)+8)/* myKey←v2776 */ ), cd←v5592, pd125); }; SOURCE(13026, 7) return(cd←v5592); }; }; }; SOURCE(13039, 19) (* (ptr) cd←v5592 ) = 1; }; }; SOURCE(13063, 35) { word pd126; pd126 = (* (( (ptr) (* (( (ptr) gf←c21440)+52)/* var←c18912 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd126 ))))(screen←v5520, (* (( (ptr) gf←c21440)+8)/* myKey←v2776 */ ), cd←v5592, pd126); }; SOURCE(10898, 2200) return(cd←v5592); } static void NoName←Q3372(formal←c0233, formal←c200016, formal←c200017, formal←c200018, formal←c200019) word formal←c0233; word formal←c200016; word formal←c200017; word formal←c200018; word formal←c200019; { register ptr gf←c0294 = (ptr) &globalframe; if ((formal←c200017 == (* (( (ptr) (* (( (ptr) gf←c0294)+52)/* var←c18912 */ ))+4) ))) { { word err←v16228; err←v16228 = (* (ptr) formal←c200019 ); SOURCE(8385, 21) (* (ptr) formal←c0233 ) = 2; (* (( (ptr) formal←c0233)+1) ) = 6; return; }; }; (* (ptr) formal←c0233 ) = 0; (* (( (ptr) formal←c0233)+1) ) = 0; return; } static void NoName←Q3432(formal←c0241, formal←c200004, formal←c200005, formal←c200006, formal←c200007) word formal←c0241; word formal←c200004; word formal←c200005; word formal←c200006; word formal←c200007; { W6 var←c0319; register ptr gf←c0295 = (ptr) &globalframe; var←c0319.f0 = formal←c200004; if ((formal←c200005 == (* (( (ptr) (* (( (ptr) gf←c0295)+52)/* var←c18912 */ ))+4) ))) { { word err←v14624; err←v14624 = (* (ptr) formal←c200007 ); SOURCE(5144, 381) { /* declaration of pixelsToFree←v7816 skipped */ SOURCE(5146, 14) var←c0319.f4/* pixelsToFree←v7816 */ = 0; SOURCE(5182, 194) lab←L100049: ; if (((* (( (ptr) formal←c200004)+14) ) != 0)) { } else { goto lab←L100047; }; SOURCE(5205, 138) { word tc127; if (( (unsigned) (* (bPt) (* (( (ptr) formal←c200004)+14) ) ) != (* (( (ptr) formal←c200004)+6) ))) { tc127 = (word) ( (unsigned) (* (bPt) (* (( (ptr) formal←c200004)+14) ) ) != (* (( (ptr) formal←c200004)+7) )); } else { tc127 = (word) 0; }; if (tc127) { SOURCE(5286, 57) { word var←c19104; var←c19104 = XR←NewObject(8, (* (( (ptr) gf←c0295)+17) )); (* (ptr) var←c19104 ) = (unsigned) (* (bPt) (* (( (ptr) formal←c200004)+14) ) ); (* (( (ptr) var←c19104)+1) ) = var←c0319.f4/* pixelsToFree←v7816 */ ; var←c0319.f4/* pixelsToFree←v7816 */ = var←c19104; }; }; }; SOURCE(5346, 30) (* (( (ptr) formal←c200004)+14) ) = (* (( (ptr) (* (( (ptr) formal←c200004)+14) ))+1) ); goto lab←L100049; lab←L100047: ; SOURCE(5378, 81) SOURCE(5378, 81) { /* declaration of var←c06 skipped */ var←c0319.f5/* var←c06 */ = (* (( (ptr) (* (( (ptr) gf←c0295)+52)/* var←c18912 */ ))+194) ); { word var←c07; { word var←c0302; var←c0302 = (word) &var←c0319; var←c07 = (word) XR←Enable(( ((word) (fPt) NoName←Q3252) ), ( ((word) (fPt) NoName←Q3552) ), var←c0302); }; /* removed trivial cond node */ }; }; SOURCE(5470, 33) SOURCE(5470, 33) { /* declaration of var←c08 skipped */ var←c0319.f5/* var←c08 */ = (* (( (ptr) (* (( (ptr) gf←c0295)+52)/* var←c18912 */ ))+46) ); { word var←c09; { word var←c0303; var←c0303 = (word) &var←c0319; var←c09 = (word) XR←Enable(( ((word) (fPt) NoName←Q3192) ), ( ((word) (fPt) NoName←Q3492) ), var←c0303); }; /* removed trivial cond node */ }; }; SOURCE(5514, 9) (* (ptr) formal←c0241 ) = 2; (* (( (ptr) formal←c0241)+1) ) = 5; return; }; }; }; (* (ptr) formal←c0241 ) = 0; (* (( (ptr) formal←c0241)+1) ) = 0; return; } static void NoName←Q3492(formal←c0247, formal←c200012, formal←c200013, formal←c200014, formal←c200015) word formal←c0247; word formal←c200012; word formal←c200013; word formal←c200014; word formal←c200015; { register ptr gf←c0296 = (ptr) &globalframe; if ((formal←c200013 == (* (( (ptr) (* (( (ptr) gf←c0296)+52)/* var←c18912 */ ))+4) ))) { { word err←v15160; err←v15160 = (* (ptr) formal←c200015 ); SOURCE(5503, 9) (* (ptr) formal←c0247 ) = 2; (* (( (ptr) formal←c0247)+1) ) = 4; return; }; }; (* (ptr) formal←c0247 ) = 0; (* (( (ptr) formal←c0247)+1) ) = 0; return; } static void NoName←Q3552(formal←c0253, formal←c200008, formal←c200009, formal←c200010, formal←c200011) word formal←c0253; word formal←c200008; word formal←c200009; word formal←c200010; word formal←c200011; { register ptr gf←c0297 = (ptr) &globalframe; if ((formal←c200009 == (* (( (ptr) (* (( (ptr) gf←c0297)+52)/* var←c18912 */ ))+4) ))) { { word err←v14980; err←v14980 = (* (ptr) formal←c200011 ); SOURCE(5459, 9) (* (ptr) formal←c0253 ) = 2; (* (( (ptr) formal←c0253)+1) ) = 3; return; }; }; (* (ptr) formal←c0253 ) = 0; (* (( (ptr) formal←c0253)+1) ) = 0; return; } static void NoName←Q3612(formal←c0259, formal←c200000, formal←c200001, formal←c200002, formal←c200003) word formal←c0259; word formal←c200000; word formal←c200001; word formal←c200002; word formal←c200003; { register ptr gf←c0298 = (ptr) &globalframe; if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c0298)+52)/* var←c18912 */ ))+4) ))) { { word err←v13960; err←v13960 = (* (ptr) formal←c200003 ); SOURCE(3776, 16) (* (ptr) formal←c0259 ) = 2; (* (( (ptr) formal←c0259)+1) ) = 2; return; }; }; (* (ptr) formal←c0259 ) = 0; (* (( (ptr) formal←c0259)+1) ) = 0; return; } /* file: XlColorAccessImpl, module: XlColorAccessImpl, compiled at: October 25, 1993 12:11:21 pm PDT */ extern void XR←install←XlColorAccessImpl() { NoName←Q3012(); } extern void XR←run←XlColorAccessImpl() { XR←Start(&globalframe); }