/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: February 21, 1992 11:34:07 pm PST */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: MaskWithColorImpl, module: MaskWithColorImpl */ /* switches: cfhklouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> #define XRM←BITLSHIFT(x, y) ((word)(x) << (word)(y)) #define XRM←BITRSHIFT(x, y) ((word)(x) >> (word)(y)) #define XRM←BITAND(x, y) (((word)(x)) & ((word)(y))) #define XRM←BITNOT(x) (~((word)(x))) #define XRM←BITOR(x, y) (((word)(x)) | ((word)(y))) static char versionStamp[] = "@(#)mob←version [1412365357,1244556932] MaskWithColorImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; #define SOURCE(p, l) /* source p, l */ static void NoName←Q1908(); static void MaskWithColorImpl←P0(); static word MakeColorWord←P60(); static void StoreWithColorMask←P120(); static void StoreWithColorRuns←P180(); static void StoreWithLongColorRuns←P240(); static word MaskToRun←P300(); static word MaskToLongRun←P360(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300T.\374-\300J.n\204@t\000\000"}; static struct {unsigned f; char r[16];} string2 = {851984, "\257\300\176\213\032\371\300\351\075\041\137\100\150\000\000"}; static struct { word f0[5]; word f5; 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[2]; } globalframe = { {0}, (word) MaskToLongRun←P360, 0, (word) MaskToRun←P300, 0, (word) StoreWithLongColorRuns←P240, 0, (word) StoreWithColorRuns←P180, 0, (word) StoreWithColorMask←P120, 0, (word) MakeColorWord←P60, 0, (word) MaskWithColorImpl←P0, {0} }; static void NoName←Q1908() { register ptr gf←c0157 = (ptr) &globalframe; word var←c10496; (void) XR←DeclareGlobalFrame((word) "MaskWithColorImpl", &globalframe, (word) XR←GetTypeIndexS((word) (&string1)), (word) ( ( (bPt) gf←c0157)+68)/* var←c9440 */ ); var←c10496 = (word) XR←ExportInterface((word) "MaskWithColor", (word) XR←GetTypeIndexS((word) (&string2)), 7); (* (( (ptr) gf←c0157)+19)/* var←c10464 */ ) = var←c10496; (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+60)/* var←c9408 */ , 67633154); (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+52)/* var←c9376 */ , 2621706); (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+44)/* var←c9344 */ , 1573382); (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+36)/* var←c9312 */ , 1573638); (void) XR←ExportVar(var←c10496, 4, (word) (( (bPt) gf←c0157)+16)/* var←c9216 */ ); (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+28)/* var←c9280 */ , 68683014); (void) XR←ExportProcS(var←c10496, (word) (( (bPt) gf←c0157)+20)/* var←c9248 */ , 68683270); } static void MaskWithColorImpl←P0(formal←c012, formal←c011) word formal←c012; word formal←c011; { /* MaskWithColorImpl: */ } static word MakeColorWord←P60(sampleColor←v3144, logDepth←v3172) word sampleColor←v3144; word logDepth←v3172; { word var←c3216; word bitsValid←v4460; word color←v4488; /* MakeColorWord: */ SOURCE(613, 352) SOURCE(703, 44) bitsValid←v4460 = (word) XRM←BITLSHIFT(1, logDepth←v3172); SOURCE(749, 78) { word var←c9472; var←c9472 = (word) XRM←BITRSHIFT( (word) -1, (32 - bitsValid←v4460)); color←v4488 = (word) XRM←BITAND(sampleColor←v3144, var←c9472); }; SOURCE(829, 111) lab←L100002: ; if ((bitsValid←v4460 < 32)) { } else { goto lab←L100000; }; SOURCE(862, 43) color←v4488 = (color←v4488 + (word) XRM←BITLSHIFT(color←v4488, bitsValid←v4460)); SOURCE(907, 33) bitsValid←v4460 = (bitsValid←v4460 + bitsValid←v4460); goto lab←L100002; lab←L100000: ; SOURCE(951, 14) return(color←v4488); } static void StoreWithColorMask←P120(maskBase←v3276, maskOffset←v3304, maskWpl←v3332, dstBase←v3360, dstOffset←v3388, dstWpl←v3416, height←v3444, width←v3472, logDepth←v3500, colorWord←v3528) word maskBase←v3276; word maskOffset←v3304; word maskWpl←v3332; word dstBase←v3360; word dstOffset←v3388; word dstWpl←v3416; word height←v3444; word width←v3472; word logDepth←v3500; word colorWord←v3528; { word unitsPerLine←v4532; /* StoreWithColorMask: */ SOURCE(971, 3096) SOURCE(1194, 44) unitsPerLine←v4532 = (dstWpl←v3416 << 2); SOURCE(1240, 63) maskBase←v3276 = (maskBase←v3276 + ((maskOffset←v3304 >> 5) << 2)); SOURCE(1305, 39) maskOffset←v3304 = (maskOffset←v3304 & 037); if ((height←v3444 == 0) || (width←v3472 == 0)) { } else { if ((logDepth←v3500 == 5)) { SOURCE(1439, 42) dstBase←v3360 = (dstBase←v3360 + (dstOffset←v3388 << 2)); SOURCE(1483, 534) lab←L100005: ; SOURCE(1483, 534) { word mwp←v4576; word maskMod←v4604; word maskWord←v4632; word dbo←v4660 = 0; SOURCE(1486, 19) mwp←v4576 = maskBase←v3276; SOURCE(1507, 31) maskMod←v4604 = maskOffset←v3304; SOURCE(1540, 41) maskWord←v4632 = (word) XRM←BITLSHIFT((* (ptr) mwp←v4576 ), maskMod←v4604); SOURCE(1602, 282) lab←L100008: ; SOURCE(1605, 84) if (( (int)maskWord←v4632 < (int)0)) { SOURCE(1645, 44) (* (( (ptr) dstBase←v3360)+dbo←v4660) ) = colorWord←v3528; }; SOURCE(1691, 33) maskWord←v4632 = (word) XRM←BITLSHIFT(maskWord←v4632, 1); SOURCE(1726, 13) dbo←v4660 = (dbo←v4660 + 1); SOURCE(1741, 20) if ((dbo←v4660 == width←v3472)) { SOURCE(1761, 4) goto lab←L100007; }; SOURCE(1767, 54) if ((maskMod←v4604 < 31)) { SOURCE(1800, 21) maskMod←v4604 = (maskMod←v4604 + 1); SOURCE(1823, 4) goto lab←L100008; }; SOURCE(1830, 11) maskMod←v4604 = 0; SOURCE(1843, 24) mwp←v4576 = (mwp←v4576 + 4); SOURCE(1869, 15) maskWord←v4632 = (* (ptr) mwp←v4576 ); goto lab←L100008; lab←L100007: ; SOURCE(1895, 19) if ((height←v3444 == 1)) { SOURCE(1914, 4) goto lab←L100004; }; SOURCE(1920, 19) height←v3444 = (height←v3444 - 1); SOURCE(1941, 42) maskBase←v3276 = (maskBase←v3276 + (maskWpl←v3332 << 2)); SOURCE(1985, 32) dstBase←v3360 = (dstBase←v3360 + unitsPerLine←v4532); }; goto lab←L100005; lab←L100004: ; } else { if ((logDepth←v3500 == 3)) { SOURCE(2063, 810) lab←L100011: ; SOURCE(2063, 810) { word mwp←v4704; word maskMod←v4732; word maskWord←v4760; word dbo←v4788; word lim←v4816; SOURCE(2066, 19) mwp←v4704 = maskBase←v3276; SOURCE(2087, 31) maskMod←v4732 = maskOffset←v3304; SOURCE(2120, 41) maskWord←v4760 = (word) XRM←BITLSHIFT((* (ptr) mwp←v4704 ), maskMod←v4732); SOURCE(2163, 25) dbo←v4788 = dstOffset←v3388; SOURCE(2190, 25) lim←v4816 = (dbo←v4788 + width←v3472); SOURCE(2217, 523) lab←L100014: ; SOURCE(2220, 216) if ((maskWord←v4760 == 0)) { SOURCE(2241, 203) { word remMask←v4860; word rem←v4888; SOURCE(2243, 41) remMask←v4860 = (32 - maskMod←v4732); SOURCE(2286, 25) rem←v4888 = (lim←v4816 - dbo←v4788); SOURCE(2313, 23) if ((remMask←v4860 >= rem←v4888)) { SOURCE(2336, 4) goto lab←L100013; }; SOURCE(2361, 19) dbo←v4788 = (dbo←v4788 + remMask←v4860); SOURCE(2382, 11) maskMod←v4732 = 0; SOURCE(2395, 24) mwp←v4704 = (mwp←v4704 + 4); SOURCE(2421, 15) maskWord←v4760 = (* (ptr) mwp←v4704 ); SOURCE(2438, 4) goto lab←L100014; }; }; SOURCE(2447, 100) if (( (int)maskWord←v4760 < (int)0)) { SOURCE(2487, 60) (* (( (bPt) dstBase←v3360)+dbo←v4788) ) = colorWord←v3528; }; SOURCE(2549, 13) dbo←v4788 = (dbo←v4788 + 1); SOURCE(2564, 18) if ((dbo←v4788 == lim←v4816)) { SOURCE(2582, 4) goto lab←L100013; }; SOURCE(2588, 33) maskWord←v4760 = (word) XRM←BITLSHIFT(maskWord←v4760, 1); SOURCE(2623, 54) if ((maskMod←v4732 < 31)) { SOURCE(2656, 21) maskMod←v4732 = (maskMod←v4732 + 1); SOURCE(2679, 4) goto lab←L100014; }; SOURCE(2686, 11) maskMod←v4732 = 0; SOURCE(2699, 24) mwp←v4704 = (mwp←v4704 + 4); SOURCE(2725, 15) maskWord←v4760 = (* (ptr) mwp←v4704 ); goto lab←L100014; lab←L100013: ; SOURCE(2751, 19) if ((height←v3444 == 1)) { SOURCE(2770, 4) goto lab←L100010; }; SOURCE(2776, 19) height←v3444 = (height←v3444 - 1); SOURCE(2797, 42) maskBase←v3276 = (maskBase←v3276 + (maskWpl←v3332 << 2)); SOURCE(2841, 32) dstBase←v3360 = (dstBase←v3360 + unitsPerLine←v4532); }; goto lab←L100011; lab←L100010: ; } else { SOURCE(2898, 1180) { word depth←v4932; word leftMask←v4960; SOURCE(2900, 40) depth←v4932 = (word) XRM←BITLSHIFT(1, logDepth←v3500); SOURCE(2942, 56) leftMask←v4960 = (word) XRM←BITLSHIFT( (word) -1, (32 - depth←v4932)); SOURCE(3000, 42) dstOffset←v3388 = (word) XRM←BITLSHIFT(dstOffset←v3388, logDepth←v3500); SOURCE(3064, 60) dstBase←v3360 = (dstBase←v3360 + ((dstOffset←v3388 >> 5) << 2)); SOURCE(3126, 37) dstOffset←v3388 = (dstOffset←v3388 & 037); SOURCE(3165, 902) lab←L100017: ; SOURCE(3165, 902) { word mwp←v5004; word maskMod←v5032; word maskWord←v5060; word dwp←v5088; word rem←v5116; word accum←v5144 = 0; word eachMask←v5172; SOURCE(3168, 19) mwp←v5004 = maskBase←v3276; SOURCE(3189, 31) maskMod←v5032 = maskOffset←v3304; SOURCE(3222, 41) maskWord←v5060 = (word) XRM←BITLSHIFT((* (ptr) mwp←v5004 ), maskMod←v5032); SOURCE(3265, 18) dwp←v5088 = dstBase←v3360; SOURCE(3285, 21) rem←v5116 = width←v3472; SOURCE(3325, 47) eachMask←v5172 = (word) XRM←BITRSHIFT(leftMask←v4960, dstOffset←v3388); SOURCE(3374, 560) lab←L100020: ; SOURCE(3377, 64) if (( (int)maskWord←v5060 < (int)0)) { SOURCE(3417, 24) accum←v5144 = (accum←v5144 + eachMask←v5172); }; SOURCE(3443, 37) eachMask←v5172 = (word) XRM←BITRSHIFT(eachMask←v5172, depth←v4932); SOURCE(3482, 103) if ((rem←v5116 == 1)) { SOURCE(3500, 85) if ((accum←v5144 != 0)) { SOURCE(3518, 67) { word var←c9504; word var←c9568; { /*1*/ word var←c9536; /*1*/ var←c9536 = (word) XRM←BITNOT(accum←v5144); /*1*/ var←c9504 = (word) XRM←BITAND((* (ptr) dwp←v5088 ), var←c9536); /*1*/ }; var←c9568 = (word) XRM←BITAND(colorWord←v3528, accum←v5144); (* (ptr) dwp←v5088 ) = (word) XRM←BITOR(var←c9504, var←c9568); }; }; SOURCE(3587, 4) goto lab←L100019; }; SOURCE(3596, 166) if ((eachMask←v5172 == 0)) { SOURCE(3619, 85) if ((accum←v5144 != 0)) { SOURCE(3637, 67) { word var←c9600; word var←c9664; { /*1*/ word var←c9632; /*1*/ var←c9632 = (word) XRM←BITNOT(accum←v5144); /*1*/ var←c9600 = (word) XRM←BITAND((* (ptr) dwp←v5088 ), var←c9632); /*1*/ }; var←c9664 = (word) XRM←BITAND(colorWord←v3528, accum←v5144); (* (ptr) dwp←v5088 ) = (word) XRM←BITOR(var←c9600, var←c9664); }; }; SOURCE(3706, 24) dwp←v5088 = (dwp←v5088 + 4); SOURCE(3732, 19) eachMask←v5172 = leftMask←v4960; SOURCE(3753, 9) accum←v5144 = 0; }; SOURCE(3767, 13) rem←v5116 = (rem←v5116 - 1); SOURCE(3782, 33) maskWord←v5060 = (word) XRM←BITLSHIFT(maskWord←v5060, 1); SOURCE(3817, 54) if ((maskMod←v5032 < 31)) { SOURCE(3850, 21) maskMod←v5032 = (maskMod←v5032 + 1); SOURCE(3873, 4) goto lab←L100020; }; SOURCE(3880, 11) maskMod←v5032 = 0; SOURCE(3893, 24) mwp←v5004 = (mwp←v5004 + 4); SOURCE(3919, 15) maskWord←v5060 = (* (ptr) mwp←v5004 ); goto lab←L100020; lab←L100019: ; SOURCE(3945, 19) if ((height←v3444 == 1)) { SOURCE(3964, 4) goto lab←L100016; }; SOURCE(3970, 19) height←v3444 = (height←v3444 - 1); SOURCE(3991, 42) maskBase←v3276 = (maskBase←v3276 + (maskWpl←v3332 << 2)); SOURCE(4035, 32) dstBase←v3360 = (dstBase←v3360 + unitsPerLine←v4532); }; goto lab←L100017; lab←L100016: ; }; }; }; }; } static void StoreWithColorRuns←P180(mask←v3588, dstBase←v3616, dstOffset←v3644, dstWpl←v3672, logDepth←v3700, colorWord←v3728) word mask←v3588; word dstBase←v3616; word dstOffset←v3644; word dstWpl←v3672; word logDepth←v3700; word colorWord←v3728; { word unitsPerLine←v5216; /* StoreWithColorRuns: */ SOURCE(4085, 2576) SOURCE(4231, 44) unitsPerLine←v5216 = (dstWpl←v3672 << 2); if ((mask←v3588 == 0) || ((* (ptr) mask←v3588 ) == 0)) { } else { if ((logDepth←v3700 == 3)) { SOURCE(4358, 924) { word dbo←v5260; SOURCE(4360, 25) dbo←v5260 = dstOffset←v3644; SOURCE(4387, 881) { register word i←v5304 = 0; register word noName←c9696; noName←c9696 = (* (ptr) mask←v3588 ); if ((i←v5304 >= noName←c9696)) { goto lab←L100021; }; lab←L100024: ; { word rb←v5348; word rem←v5376; word lim←v5404; SOURCE(4418, 21) rb←v5348 = (word) (* ((( (bPt) mask←v3588)+4)+i←v5304) ); SOURCE(4441, 24) rem←v5376 = ((((unsigned)rb←v5348 << 24) >> 26) + 1); SOURCE(4467, 25) lim←v5404 = (dbo←v5260 + rem←v5376); SOURCE(4494, 690) if (rb←v5348 & 02) { SOURCE(4513, 671) if ((rem←v5376 < 4)) { SOURCE(4531, 158) if ((rem←v5376 >= 2)) { SOURCE(4550, 60) (* (( (bPt) dstBase←v3616)+dbo←v5260) ) = colorWord←v3728; SOURCE(4612, 62) (* (( (bPt) dstBase←v3616)+(dbo←v5260 + 1)) ) = colorWord←v3728; SOURCE(4676, 13) dbo←v5260 = (dbo←v5260 + 2); }; SOURCE(4694, 82) if (((rem←v5376 & 1) == 1)) { SOURCE(4716, 60) (* (( (bPt) dstBase←v3616)+dbo←v5260) ) = colorWord←v3728; }; } else { SOURCE(4785, 399) SOURCE(4787, 131) lab←L100028: ; if (((dbo←v5260 & 3) != 0)) { } else { goto lab←L100026; }; SOURCE(4823, 60) (* (( (bPt) dstBase←v3616)+dbo←v5260) ) = colorWord←v3728; SOURCE(4885, 13) dbo←v5260 = (dbo←v5260 + 1); SOURCE(4900, 18) if ((dbo←v5260 == lim←v5404)) { SOURCE(4918, 13) goto lab←L100025; }; goto lab←L100028; lab←L100026: ; SOURCE(4942, 105) lab←L100031: ; if (((dbo←v5260 + 4) <= lim←v5404)) { } else { goto lab←L100029; }; SOURCE(4977, 44) (* (ptr) (dstBase←v3616 + dbo←v5260) ) = colorWord←v3728; SOURCE(5023, 24) dbo←v5260 = (dbo←v5260 + 4); goto lab←L100031; lab←L100029: ; SOURCE(5058, 94) lab←L100034: ; if ((dbo←v5260 < lim←v5404)) { } else { goto lab←L100032; }; SOURCE(5077, 60) (* (( (bPt) dstBase←v3616)+dbo←v5260) ) = colorWord←v3728; SOURCE(5139, 13) dbo←v5260 = (dbo←v5260 + 1); goto lab←L100034; lab←L100032: ; goto lab←L100035; lab←L100025: ; lab←L100035: ; }; }; SOURCE(5190, 9) dbo←v5260 = lim←v5404; SOURCE(5201, 67) if (rb←v5348 & 1) { SOURCE(5219, 32) dstBase←v3616 = (dstBase←v3616 + unitsPerLine←v5216); SOURCE(5253, 15) dbo←v5260 = dstOffset←v3644; }; }; i←v5304 = (i←v5304 + 1); if ((i←v5304 < noName←c9696)) { goto lab←L100024; }; lab←L100021: ; }; }; } else { if ((logDepth←v3700 == 5)) { SOURCE(5328, 346) { word dbo←v5448 = 0; SOURCE(5349, 42) dstBase←v3616 = (dstBase←v3616 + (dstOffset←v3644 << 2)); SOURCE(5393, 267) { register word i←v5492 = 0; register word noName←c9728; noName←c9728 = (* (ptr) mask←v3588 ); if ((i←v5492 >= noName←c9728)) { goto lab←L100036; }; lab←L100039: ; { word rb←v5536; word lim←v5564; SOURCE(5424, 21) rb←v5536 = (word) (* ((( (bPt) mask←v3588)+4)+i←v5492) ); SOURCE(5447, 30) lim←v5564 = ((dbo←v5448 + (((unsigned)rb←v5536 << 24) >> 26)) + 1); SOURCE(5479, 97) if (rb←v5536 & 02) { SOURCE(5498, 78) lab←L100042: ; if ((dbo←v5448 < lim←v5564)) { } else { goto lab←L100040; }; SOURCE(5517, 44) (* (( (ptr) dstBase←v3616)+dbo←v5448) ) = colorWord←v3728; SOURCE(5563, 13) dbo←v5448 = (dbo←v5448 + 1); goto lab←L100042; lab←L100040: ; }; SOURCE(5590, 9) dbo←v5448 = lim←v5564; SOURCE(5601, 59) if (rb←v5536 & 1) { SOURCE(5619, 32) dstBase←v3616 = (dstBase←v3616 + unitsPerLine←v5216); SOURCE(5653, 7) dbo←v5448 = 0; }; }; i←v5492 = (i←v5492 + 1); if ((i←v5492 < noName←c9728)) { goto lab←L100039; }; lab←L100036: ; }; }; } else { SOURCE(5688, 984) { word dbo←v5608; SOURCE(5690, 46) dbo←v5608 = (word) XRM←BITLSHIFT(dstOffset←v3644, logDepth←v3700); SOURCE(5738, 15) dstOffset←v3644 = dbo←v5608; SOURCE(5755, 906) { register word i←v5652 = 0; register word noName←c9760; noName←c9760 = (* (ptr) mask←v3588 ); if ((i←v5652 >= noName←c9760)) { goto lab←L100043; }; lab←L100046: ; { word rb←v5696; word bits←v5724; SOURCE(5786, 21) rb←v5696 = (word) (* ((( (bPt) mask←v3588)+4)+i←v5652) ); SOURCE(5809, 46) bits←v5724 = (word) XRM←BITLSHIFT(((((unsigned)rb←v5696 << 24) >> 26) + 1), logDepth←v3700); SOURCE(5857, 708) if ( ( (rb←v5696 & 02) ? (bits←v5724 != 0) : 0 ) ) { SOURCE(5887, 678) SOURCE(5889, 20) { word rem←v5768; word wp←v5796; word mod←v5824; SOURCE(5889, 20) rem←v5768 = bits←v5724; SOURCE(5911, 54) wp←v5796 = (dstBase←v3616 + ((dbo←v5608 >> 5) << 2)); SOURCE(5967, 35) mod←v5824 = (dbo←v5608 & 037); SOURCE(6004, 306) if ((mod←v5824 != 0)) { SOURCE(6020, 292) /*1*/ { /*1*/ word mask←v5868; /*1*/ word lim←v5896; SOURCE(6022, 38) /*1*/ mask←v5868 = (word) XRM←BITRSHIFT( (word) -1, mod←v5824); SOURCE(6062, 25) /*1*/ lim←v5896 = (rem←v5768 + mod←v5824); SOURCE(6089, 65) /*1*/ if ((lim←v5896 < 32)) { SOURCE(6115, 39) /*1*/ mask←v5868 = (mask←v5868 - (word) XRM←BITRSHIFT( (word) -1, lim←v5896)); /*1*/ }; SOURCE(6156, 63) /*1*/ { /*1*/ word var←c9792; /*1*/ word var←c9856; /*1*/ { /*1*/ word var←c9824; /*1*/ var←c9824 = (word) XRM←BITNOT(mask←v5868); /*1*/ var←c9792 = (word) XRM←BITAND((* (ptr) wp←v5796 ), var←c9824); /*1*/ }; /*1*/ var←c9856 = (word) XRM←BITAND(colorWord←v3728, mask←v5868); /*1*/ (* (ptr) wp←v5796 ) = (word) XRM←BITOR(var←c9792, var←c9856); /*1*/ }; SOURCE(6221, 27) /*1*/ if ((lim←v5896 <= 32)) { SOURCE(6248, 13) /*1*/ goto lab←L100047; /*1*/ }; SOURCE(6263, 22) /*1*/ wp←v5796 = (wp←v5796 + 4); SOURCE(6287, 23) /*1*/ rem←v5768 = (lim←v5896 - 32); /*1*/ }; /*1*/ }; SOURCE(6315, 92) lab←L100050: ; if ((rem←v5768 >= 32)) { /*1*/ } else { /*1*/ goto lab←L100048; /*1*/ }; SOURCE(6343, 15) (* (ptr) wp←v5796 ) = colorWord←v3728; SOURCE(6360, 23) rem←v5768 = (rem←v5768 - 32); SOURCE(6385, 22) wp←v5796 = (wp←v5796 + 4); goto lab←L100050; lab←L100048: ; SOURCE(6418, 121) if ((rem←v5768 != 0)) { SOURCE(6434, 107) /*1*/ { /*1*/ word mask←v5940; SOURCE(6436, 38) /*1*/ mask←v5940 = (word) XRM←BITRSHIFT( (word) -1, rem←v5768); SOURCE(6476, 63) /*1*/ { /*1*/ word var←c9888; /*1*/ word var←c9920; /*1*/ var←c9888 = (word) XRM←BITAND((* (ptr) wp←v5796 ), mask←v5940); /*1*/ { /*1*/ word var←c9952; /*1*/ var←c9952 = (word) XRM←BITNOT(mask←v5940); /*1*/ var←c9920 = (word) XRM←BITAND(colorWord←v3728, var←c9952); /*1*/ }; /*1*/ (* (ptr) wp←v5796 ) = (word) XRM←BITOR(var←c9888, var←c9920); /*1*/ }; /*1*/ }; /*1*/ }; }; goto lab←L100051; lab←L100047: ; lab←L100051: ; }; SOURCE(6568, 16) dbo←v5608 = (dbo←v5608 + bits←v5724); SOURCE(6586, 20) if ( ! (rb←v5696 & 1)) { SOURCE(6606, 4) goto lab←L100045; }; SOURCE(6612, 32) dstBase←v3616 = (dstBase←v3616 + unitsPerLine←v5216); SOURCE(6646, 15) dbo←v5608 = dstOffset←v3644; }; lab←L100045: ; i←v5652 = (i←v5652 + 1); if ((i←v5652 < noName←c9760)) { goto lab←L100046; }; lab←L100043: ; }; }; }; }; }; } static void StoreWithLongColorRuns←P240(mask←v3788, dstBase←v3816, dstOffset←v3844, dstWpl←v3872, logDepth←v3900, colorWord←v3928) word mask←v3788; word dstBase←v3816; word dstOffset←v3844; word dstWpl←v3872; word logDepth←v3900; word colorWord←v3928; { word unitsPerLine←v5984; /* StoreWithLongColorRuns: */ SOURCE(6679, 2447) SOURCE(6833, 44) unitsPerLine←v5984 = (dstWpl←v3872 << 2); if ((mask←v3788 == 0) || ((* (ptr) mask←v3788 ) == 0)) { } else { if ((logDepth←v3900 == 3)) { SOURCE(6962, 896) { register word i←v6028 = 0; register word noName←c9984; noName←c9984 = (* (ptr) mask←v3788 ); if ((i←v6028 >= noName←c9984)) { goto lab←L100052; }; lab←L100055: ; { word run←v6072; word dbo←v6100; word rem←v6128; SOURCE(6993, 22) run←v6072 = (* ((( (ptr) mask←v3788)+1)+i←v6028) ); SOURCE(7017, 36) dbo←v6100 = (dstOffset←v3844 + ((unsigned)run←v6072 >> 16)); SOURCE(7055, 25) rem←v6128 = ( (((unsigned)run←v6072 << 17) >> 17) ); SOURCE(7082, 718) if ((rem←v6128 < 4)) { SOURCE(7100, 158) if ((rem←v6128 >= 2)) { SOURCE(7119, 60) (* (( (bPt) dstBase←v3816)+dbo←v6100) ) = colorWord←v3928; SOURCE(7181, 62) (* (( (bPt) dstBase←v3816)+(dbo←v6100 + 1)) ) = colorWord←v3928; SOURCE(7245, 13) dbo←v6100 = (dbo←v6100 + 2); }; SOURCE(7263, 82) if (((rem←v6128 & 1) == 1)) { SOURCE(7285, 60) (* (( (bPt) dstBase←v3816)+dbo←v6100) ) = colorWord←v3928; }; } else { SOURCE(7354, 449) { word lim←v6172; SOURCE(7356, 25) lim←v6172 = (dbo←v6100 + rem←v6128); SOURCE(7383, 417) if ((dbo←v6100 < lim←v6172)) { SOURCE(7401, 399) SOURCE(7403, 131) lab←L100059: ; if (((dbo←v6100 & 3) != 0)) { } else { goto lab←L100057; }; SOURCE(7439, 60) (* (( (bPt) dstBase←v3816)+dbo←v6100) ) = colorWord←v3928; SOURCE(7501, 13) dbo←v6100 = (dbo←v6100 + 1); SOURCE(7516, 18) if ((dbo←v6100 == lim←v6172)) { SOURCE(7534, 13) goto lab←L100056; }; goto lab←L100059; lab←L100057: ; SOURCE(7558, 105) lab←L100062: ; if (((dbo←v6100 + 4) <= lim←v6172)) { } else { goto lab←L100060; }; SOURCE(7593, 44) (* (ptr) (dstBase←v3816 + dbo←v6100) ) = colorWord←v3928; SOURCE(7639, 24) dbo←v6100 = (dbo←v6100 + 4); goto lab←L100062; lab←L100060: ; SOURCE(7674, 94) lab←L100065: ; if ((dbo←v6100 < lim←v6172)) { } else { goto lab←L100063; }; SOURCE(7693, 60) (* (( (bPt) dstBase←v3816)+dbo←v6100) ) = colorWord←v3928; SOURCE(7755, 13) dbo←v6100 = (dbo←v6100 + 1); goto lab←L100065; lab←L100063: ; goto lab←L100066; lab←L100056: ; lab←L100066: ; }; }; }; SOURCE(7806, 52) if (run←v6072 & 0100000) { SOURCE(7826, 32) dstBase←v3816 = (dstBase←v3816 + unitsPerLine←v5984); }; }; i←v6028 = (i←v6028 + 1); if ((i←v6028 < noName←c9984)) { goto lab←L100055; }; lab←L100052: ; }; } else { if ((logDepth←v3900 == 5)) { SOURCE(7917, 42) dstBase←v3816 = (dstBase←v3816 + (dstOffset←v3844 << 2)); SOURCE(7961, 255) { register word i←v6216 = 0; register word noName←c10016; noName←c10016 = (* (ptr) mask←v3788 ); if ((i←v6216 >= noName←c10016)) { goto lab←L100067; }; lab←L100070: ; { word run←v6260; word dbo←v6288; word lim←v6316; SOURCE(7992, 22) run←v6260 = (* ((( (ptr) mask←v3788)+1)+i←v6216) ); SOURCE(8016, 24) dbo←v6288 = ((unsigned)run←v6260 >> 16); SOURCE(8042, 31) lim←v6316 = (dbo←v6288 + ( (((unsigned)run←v6260 << 17) >> 17) )); SOURCE(8075, 78) lab←L100073: ; if ((dbo←v6288 < lim←v6316)) { } else { goto lab←L100071; }; SOURCE(8094, 44) (* (( (ptr) dstBase←v3816)+dbo←v6288) ) = colorWord←v3928; SOURCE(8140, 13) dbo←v6288 = (dbo←v6288 + 1); goto lab←L100073; lab←L100071: ; SOURCE(8164, 52) if (run←v6260 & 0100000) { SOURCE(8184, 32) dstBase←v3816 = (dstBase←v3816 + unitsPerLine←v5984); }; }; i←v6216 = (i←v6216 + 1); if ((i←v6216 < noName←c10016)) { goto lab←L100070; }; lab←L100067: ; }; } else { SOURCE(8243, 883) { register word i←v6360 = 0; register word noName←c10048; noName←c10048 = (* (ptr) mask←v3788 ); if ((i←v6360 >= noName←c10048)) { goto lab←L100074; }; lab←L100077: ; { word run←v6404; word rem←v6432; SOURCE(8274, 22) run←v6404 = (* ((( (ptr) mask←v3788)+1)+i←v6360) ); SOURCE(8298, 46) rem←v6432 = (word) XRM←BITLSHIFT(( (((unsigned)run←v6404 << 17) >> 17) ), logDepth←v3900); SOURCE(8346, 725) if ((rem←v6432 != 0)) { SOURCE(8362, 709) SOURCE(8364, 57) { word dbo←v6476; word wp←v6504; word mod←v6532; SOURCE(8364, 57) dbo←v6476 = (word) XRM←BITLSHIFT((dstOffset←v3844 + ((unsigned)run←v6404 >> 16)), logDepth←v3900); SOURCE(8423, 54) wp←v6504 = (dstBase←v3816 + ((dbo←v6476 >> 5) << 2)); SOURCE(8479, 35) mod←v6532 = (dbo←v6476 & 037); SOURCE(8516, 303) if ((mod←v6532 != 0)) { SOURCE(8532, 289) { /*1*/ word mask←v6576; /*1*/ word lim←v6604; SOURCE(8534, 38) /*1*/ mask←v6576 = (word) XRM←BITRSHIFT( (word) -1, mod←v6532); SOURCE(8574, 25) /*1*/ lim←v6604 = (rem←v6432 + mod←v6532); SOURCE(8601, 65) /*1*/ if ((lim←v6604 < 32)) { SOURCE(8627, 39) /*1*/ mask←v6576 = (mask←v6576 - (word) XRM←BITRSHIFT( (word) -1, lim←v6604)); /*1*/ }; SOURCE(8668, 63) /*1*/ { /*1*/ word var←c10080; /*1*/ word var←c10144; /*1*/ { /*1*/ word var←c10112; /*1*/ var←c10112 = (word) XRM←BITNOT(mask←v6576); /*1*/ var←c10080 = (word) XRM←BITAND((* (ptr) wp←v6504 ), var←c10112); /*1*/ }; /*1*/ var←c10144 = (word) XRM←BITAND(colorWord←v3928, mask←v6576); /*1*/ (* (ptr) wp←v6504 ) = (word) XRM←BITOR(var←c10080, var←c10144); /*1*/ }; SOURCE(8733, 27) /*1*/ if ((lim←v6604 <= 32)) { SOURCE(8760, 10) /*1*/ goto lab←L100078; /*1*/ }; SOURCE(8772, 22) /*1*/ wp←v6504 = (wp←v6504 + 4); SOURCE(8796, 23) /*1*/ rem←v6432 = (lim←v6604 - 32); /*1*/ }; }; SOURCE(8824, 92) lab←L100081: ; if ((rem←v6432 >= 32)) { } else { goto lab←L100079; }; SOURCE(8852, 15) (* (ptr) wp←v6504 ) = colorWord←v3928; SOURCE(8869, 23) rem←v6432 = (rem←v6432 - 32); SOURCE(8894, 22) wp←v6504 = (wp←v6504 + 4); goto lab←L100081; lab←L100079: ; SOURCE(8927, 121) if ((rem←v6432 != 0)) { SOURCE(8943, 107) { /*1*/ word mask←v6648; SOURCE(8945, 38) /*1*/ mask←v6648 = (word) XRM←BITRSHIFT( (word) -1, rem←v6432); SOURCE(8985, 63) /*1*/ { /*1*/ word var←c10176; /*1*/ word var←c10208; /*1*/ var←c10176 = (word) XRM←BITAND((* (ptr) wp←v6504 ), mask←v6648); /*1*/ { /*1*/ word var←c10240; /*1*/ var←c10240 = (word) XRM←BITNOT(mask←v6648); /*1*/ var←c10208 = (word) XRM←BITAND(colorWord←v3928, var←c10240); /*1*/ }; /*1*/ (* (ptr) wp←v6504 ) = (word) XRM←BITOR(var←c10176, var←c10208); /*1*/ }; /*1*/ }; }; }; goto lab←L100082; lab←L100078: ; lab←L100082: ; }; SOURCE(9074, 52) if (run←v6404 & 0100000) { SOURCE(9094, 32) dstBase←v3816 = (dstBase←v3816 + unitsPerLine←v5984); }; }; i←v6360 = (i←v6360 + 1); if ((i←v6360 < noName←c10048)) { goto lab←L100077; }; lab←L100074: ; }; }; }; }; } static word MaskToRun←P300(run←v4004, maskPtr←v4032, offset←v4060, wpl←v4088, height←v4116, width←v4144) word run←v4004; word maskPtr←v4032; word offset←v4060; word wpl←v4088; word height←v4116; word width←v4144; { register ptr gf←c10528 = (ptr) &globalframe; word var←c4188; word seqLen←v6692 = 0; word mp←v6720; /* MaskToRun: */ SOURCE(9174, 974) SOURCE(9338, 31) mp←v6720 = maskPtr←v4032; SOURCE(9371, 698) if ( ( (height←v4116 != 0) ? (width←v4144 != 0) : 0 ) ) { SOURCE(9404, 665) { register word noName←c10272 = 0; register word noName←c10304; noName←c10304 = height←v4116; if ((noName←c10272 >= noName←c10304)) { goto lab←L100083; }; lab←L100086: ; { word runLen←v6764 = 0; word runBit←v6792 = 0; word runLast←v6820 = 0; word emptyLine←v6848 = 1; word j←v6876 = 0; word lim←v6904; SOURCE(9535, 21) lim←v6904 = width←v4144; SOURCE(9558, 55) lab←L100089: ; { word tc3; word x4; if ((lim←v6904 > 1)) { tc3 = (word) (( x4 = ((lim←v6904 - 1) + offset←v4060), ((* (ptr) (( (ptr) mp←v6720) + (x4 >> 5)) ) >> (31 - ((x4 & 037)))) & 1 ) == 0); } else { tc3 = (word) 0; }; if (tc3) { } else { goto lab←L100087; }; }; SOURCE(9600, 13) lim←v6904 = (lim←v6904 - 1); goto lab←L100089; lab←L100087: ; SOURCE(9624, 409) lab←L100092: ; if ((j←v6876 < lim←v6904)) { } else { goto lab←L100090; }; { word bit←v6948; SOURCE(9641, 23) bit←v6948 = (((* (ptr) (( (ptr) mp←v6720) + ((j←v6876 + offset←v4060) >> 5)) ) >> (31 - (((j←v6876 + offset←v4060) & 037)))) & 1); SOURCE(9666, 31) if ((runLen←v6764 == 0)) { SOURCE(9685, 12) runBit←v6792 = bit←v6948; }; SOURCE(9699, 97) if ((bit←v6948 == runBit←v6792)) { SOURCE(9722, 19) runLen←v6764 = (runLen←v6764 + 1); SOURCE(9743, 9) j←v6876 = (j←v6876 + 1); if ((j←v6876 == lim←v6904)) { SOURCE(9782, 14) runLast←v6820 = 1; } else { if ((runLen←v6764 < 64)) { SOURCE(9838, 4) goto lab←L100092; }; }; }; SOURCE(9856, 124) if ((run←v4004 != 0)) { SOURCE(9876, 38) if ((seqLen←v6692 >= (* (ptr) run←v4004 ))) { SOURCE(9902, 12) (void) XR←RaiseError((word) (( (bPt) gf←c10528)+16)/* var←c9216 */ , 0); }; SOURCE(9916, 64) (* ((( (bPt) run←v4004)+4)+seqLen←v6692) ) = ((((((runLen←v6764 - 1) & 077) << 1) + (runBit←v6792 & 1)) << 1) + (runLast←v6820 & 1)); }; SOURCE(9985, 19) seqLen←v6692 = (seqLen←v6692 + 1); SOURCE(10006, 10) runLen←v6764 = 0; SOURCE(10018, 15) runLast←v6820 = 0; }; goto lab←L100092; lab←L100090: ; SOURCE(10044, 25) mp←v6720 = (mp←v6720 + (wpl←v4088 << 2)); }; noName←c10272 = (noName←c10272 + 1); if ((noName←c10272 < noName←c10304)) { goto lab←L100086; }; lab←L100083: ; }; }; SOURCE(10080, 51) if ( ( (run←v4004 != 0) ? (seqLen←v6692 != (* (ptr) run←v4004 )) : 0 ) ) { SOURCE(10119, 12) (void) XR←RaiseError((word) (( (bPt) gf←c10528)+16)/* var←c9216 */ , 0); }; SOURCE(10133, 15) return(seqLen←v6692); } static word MaskToLongRun←P360(run←v4248, maskPtr←v4276, offset←v4304, wpl←v4332, height←v4360, width←v4388) word run←v4248; word maskPtr←v4276; word offset←v4304; word wpl←v4332; word height←v4360; word width←v4388; { register ptr gf←c10560 = (ptr) &globalframe; word var←c4432; word seqLen←v6992 = 0; word mp←v7020; /* MaskToLongRun: */ SOURCE(10154, 796) SOURCE(10326, 31) mp←v7020 = maskPtr←v4276; SOURCE(10359, 512) if ( ( (height←v4360 != 0) ? (width←v4388 != 0) : 0 ) ) { SOURCE(10392, 479) { register word noName←c10368 = 0; register word noName←c10400; noName←c10400 = height←v4360; if ((noName←c10368 >= noName←c10400)) { goto lab←L100093; }; lab←L100096: ; { word j←v7064 = 0; word lim←v7092; SOURCE(10432, 21) lim←v7092 = width←v4388; SOURCE(10455, 55) lab←L100099: ; { word tc5; word x6; if ((lim←v7092 > 1)) { tc5 = (word) (( x6 = ((lim←v7092 - 1) + offset←v4304), ((* (ptr) (( (ptr) mp←v7020) + (x6 >> 5)) ) >> (31 - ((x6 & 037)))) & 1 ) == 0); } else { tc5 = (word) 0; }; if (tc5) { } else { goto lab←L100097; }; }; SOURCE(10497, 13) lim←v7092 = (lim←v7092 - 1); goto lab←L100099; lab←L100097: ; SOURCE(10521, 310) lab←L100102: ; SOURCE(10521, 310) { word start←v7136; SOURCE(10541, 47) lab←L100105: ; { word tc7; if ((j←v7064 < lim←v7092)) { tc7 = (word) ((((* (ptr) (( (ptr) mp←v7020) + ((j←v7064 + offset←v4304) >> 5)) ) >> (31 - (((j←v7064 + offset←v4304) & 037)))) & 1) == 0); } else { tc7 = (word) 0; }; if (tc7) { } else { goto lab←L100103; }; }; SOURCE(10579, 9) j←v7064 = (j←v7064 + 1); goto lab←L100105; lab←L100103: ; SOURCE(10599, 9) start←v7136 = j←v7064; SOURCE(10610, 47) lab←L100108: ; { word tc8; if ((j←v7064 < lim←v7092)) { tc8 = (word) ((((* (ptr) (( (ptr) mp←v7020) + ((j←v7064 + offset←v4304) >> 5)) ) >> (31 - (((j←v7064 + offset←v4304) & 037)))) & 1) == 1); } else { tc8 = (word) 0; }; if (tc8) { } else { goto lab←L100106; }; }; SOURCE(10648, 9) j←v7064 = (j←v7064 + 1); goto lab←L100108; lab←L100106: ; SOURCE(10668, 121) if ((run←v4248 != 0)) { SOURCE(10688, 38) if ((seqLen←v6992 >= (* (ptr) run←v4248 ))) { SOURCE(10714, 12) (void) XR←RaiseError((word) (( (bPt) gf←c10560)+16)/* var←c9216 */ , 0); }; SOURCE(10728, 61) (* ((( (ptr) run←v4248)+1)+seqLen←v6992) ) = ((((( (((unsigned)start←v7136 << 16) >> 16) ) << 1) + (j←v7064 == lim←v7092)) << 15) + ( (((unsigned)(j←v7064 - start←v7136) << 17) >> 17) )); }; SOURCE(10794, 19) seqLen←v6992 = (seqLen←v6992 + 1); SOURCE(10815, 16) if ((j←v7064 == lim←v7092)) { SOURCE(10831, 4) goto lab←L100101; }; }; goto lab←L100102; lab←L100101: ; SOURCE(10846, 25) mp←v7020 = (mp←v7020 + (wpl←v4332 << 2)); }; noName←c10368 = (noName←c10368 + 1); if ((noName←c10368 < noName←c10400)) { goto lab←L100096; }; lab←L100093: ; }; }; SOURCE(10882, 51) if ( ( (run←v4248 != 0) ? (seqLen←v6992 != (* (ptr) run←v4248 )) : 0 ) ) { SOURCE(10921, 12) (void) XR←RaiseError((word) (( (bPt) gf←c10560)+16)/* var←c9216 */ , 0); }; SOURCE(10935, 15) return(seqLen←v6992); } /* file: MaskWithColorImpl, module: MaskWithColorImpl, compiled at: February 21, 1992 11:34:06 pm PST */ extern void XR←install←MaskWithColorImpl() { NoName←Q1908(); } extern void XR←run←MaskWithColorImpl() { XR←Start(&globalframe); }