/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: January 27, 1993 4:57:23 pm PST */ /* C2C version: October 7, 1992 (native) */ /* ref-counting: off */ /* file: RopeFileImpl, module: RopeFileImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> #define XRM←BITRSHIFT(x, y) ((word)(x) >> (word)(y)) #define XRM←BITLSHIFT(x, y) ((word)(x) << (word)(y)) static char versionStamp[] = "@(#)mob←version [444809019,3469543428] RopeFileImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1;} W2; typedef W2 *W2Pt; typedef struct {word f0, f1, f2;} W3; typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {W8 f; W2 r;} W10; #define SOURCE(p, l) /* source p, l */ #define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i ) #define MAX(cast, x, y) ( ( cast x) > ( cast y) ? (x) : (y) ) #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) ) #define IOP2(op, x, y) ( (word) ((x) op (y)) ) #define MIN(cast, x, y) ( ( cast x) < ( cast y) ? (x) : (y) ) static void NoName←Q3288(); static void RopeFileImpl←P0(); static word NewBuffer←P60(); static word Flattery←P120(); static word CreateByteSequenceObject←P180(); static word FromByteSequenceObject←P240(); static void Note←P300(); static void Touch←P360(); static void Remove←P420(); static word FindOld←P480(); static word GetDeactivationTargets←P540(); static word GetObjectList←P600(); static void LimitActive←P660(); static word RopeFileFetch←P720(); static word RopeFileMap←P780(); static word NoName←Q3348(); static word RopeFileMove←P840(); static word ObtainBuffer←P900(); static word FindBuffer←P960(); static void ReleaseBuffer←P1020(); static void Finalizer←P1080(); static void KillBuffers←P1140(); static void Deactivate←P1200(); static void RopeFilesCommand←P1260(); static void P←P3012(); static void NoName←Q3408(); static struct {unsigned f; char r[80];} string1 = {5111888, "\260\006\005\146\151\162\163\164\216\211\022\021\106\151\156\141\154\151\172\141\142\154\145\117\142\152\145\143\164\300\250\013\333\033\300\120\151\334\170\005\004\162\145\163\164\214\216\211\022\021\106\151\156\141\154\151\172\141\142\154\145\117\142\152\145\143\164\300\250\013\333\033\300\120\151\334\170\261\000"}; static struct {unsigned f; char r[4];} string2 = {131074, "\004\003\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\032\203\077\073\300\316\315\010\004\100\214\000\000"}; static struct {unsigned f; char r[4];} string4 = {196611, "\004@A"}; static struct {unsigned f; char r[16];} string5 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\104\304\000\000"}; static struct {unsigned f; char r[24];} string6 = {1376277, "\007\000\001\002\007\020\001\002\000\007\036\002\004\003\002\004\014\016\015\003\001\000\000"}; static struct {unsigned f; char r[16];} string7 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"}; static struct {unsigned f; char r[4];} string8 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\262\334\125\203\300\272\176\356\230\100\164\000\000"}; static struct {unsigned f; char r[4];} string10 = {131074, "\003\005\000"}; static struct {unsigned f; char r[48];} string11 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\262\334\125\203\300\272\176\356\230\100\164\005\004\162\145\163\164\214\216\257\300\262\334\125\203\300\272\176\356\230\100\164\261\000\000\000"}; static struct {unsigned f; char r[4];} string12 = {131076, "\216\251\000"}; static struct {unsigned f; char r[44];} string13 = {2752556, "\260\006\005\146\151\162\163\164\257\300\015\277\004\146\300\034\367\146\045\112\114\005\004\162\145\163\164\214\257\300\015\277\004\146\300\034\367\146\045\112\114\261\000"}; static struct {unsigned f; char r[28];} string14 = {1572888, "\006\002\000\007\000\040\016\000\003\001\000\000\000\000\014\014\000\014\014\014\014\000\010\001\000\000\000"}; static struct {unsigned f; char r[4];} string15 = {65540, "O\000\000"}; static struct {unsigned f; char r[4];} string16 = {65540, "X\000\000"}; static struct {unsigned f; char r[16];} string17 = {983056, "%g\012 %g %9d %g\012"}; static struct {unsigned f; char r[52];} string18 = {3342388, "RopeFileImpl: Failed to get expected amount of data"}; static struct {unsigned f; char r[8];} string19 = {458760, "BadMove"}; static struct {unsigned f; char r[48];} string20 = {2949168, "Lists the files currently in use as RopeFiles\000\000"}; static struct {unsigned f; char r[12];} string21 = {589836, "RopeFiles\000\000"}; static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\032\203\077\073\300\316\315\010\004\100\164\000\000"}; static struct {unsigned f; char r[16];} string23 = {917518, "\006\004\070\001\074\001\100\100\001\100\170\004\100\177\000"}; static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"}; static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\250\013\333\033\300\120\151\334\170\100\150\000\000"}; static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\157\176\027\244\300\037\074\133\137\100\150\000\000"}; static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\354\241\072\167\300\017\164\046\072\100\164\000\000"}; static struct {unsigned f; char r[16];} string28 = {851984, "\257\300\061\347\231\302\300\102\104\205\246\100\150\000\000"}; static struct {unsigned f; char r[16];} string29 = {851984, "\257\300\373\225\000\071\300\362\156\307\320\100\150\000\000"}; static struct {unsigned f; char r[16];} string30 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"}; static struct {unsigned f; char r[16];} string31 = {851984, "\257\300\262\334\125\203\300\272\176\356\230\100\150\000\000"}; static struct { word f0[8]; word f8; word f9; word f10[28]; word f38; word f39; word f40; word f41; word f42; word f43; word f44; word f45; word f46; word f47; word f48; word f49; word f50; word f51; word f52; word f53; word f54; word f55; word f56; word f57; word f58; word f59; word f60; word f61; word f62; word f63; word f64; word f65; word f66; word f67; word f68; word f69; word f70; word f71; word f72; word f73; word f74; word f75; word f76; word f77; word f78; word f79; word f80; word f81[9]; } globalframe = { {0}, (word) 16384, (word) 32756, {0}, (word) RopeFilesCommand←P1260, 0, (word) Deactivate←P1200, 0, (word) KillBuffers←P1140, 0, (word) Finalizer←P1080, 0, (word) ReleaseBuffer←P1020, 0, (word) FindBuffer←P960, 0, (word) ObtainBuffer←P900, 0, (word) RopeFileMove←P840, 0, (word) RopeFileMap←P780, 0, (word) RopeFileFetch←P720, 0, (word) LimitActive←P660, 0, (word) GetObjectList←P600, 0, (word) GetDeactivationTargets←P540, 0, (word) FindOld←P480, 0, (word) Remove←P420, 0, (word) Touch←P360, 0, (word) Note←P300, 0, (word) FromByteSequenceObject←P240, 0, (word) CreateByteSequenceObject←P180, 0, (word) Flattery←P120, 0, (word) NewBuffer←P60, 0, (word) RopeFileImpl←P0, {0} }; static void NoName←Q3288() { register ptr gf←c0208 = (ptr) &globalframe; word var←c22968; (* (( (ptr) gf←c0208)+17) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf←c0208)+18) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4); (* (( (ptr) gf←c0208)+20) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string6); (* (( (ptr) gf←c0208)+21) ) = (word) XR←GetTypeIndex((word) &string7, 0, (word) &string8); (* (( (ptr) gf←c0208)+24) ) = (word) XR←GetTypeIndex((word) &string9, 0, (word) &string10); (* (( (ptr) gf←c0208)+25) ) = (word) XR←GetTypeIndex((word) &string11, 0, (word) &string2); (* (( (ptr) gf←c0208)+26) ) = (word) XR←GetTypeIndex((word) &string12, 0, (word) &string8); (* (( (ptr) gf←c0208)+29) ) = (word) XR←GetTypeIndex((word) &string13, 0, (word) &string14); (* (ptr) (( (bPt) gf←c0208)+120) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string15); (* (ptr) (( (bPt) gf←c0208)+124) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string16); (* (ptr) (( (bPt) gf←c0208)+128) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string17); (* (ptr) (( (bPt) gf←c0208)+132) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string18); (* (ptr) (( (bPt) gf←c0208)+136) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+26) ), (word) &string19); (* (ptr) (( (bPt) gf←c0208)+140) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string20); (* (ptr) (( (bPt) gf←c0208)+144) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0208)+21) ), (word) &string21); (void) XR←DeclareGlobalFrame((word) "RopeFileImpl", &globalframe, (word) XR←GetTypeIndex((word) &string22, 0, (word) &string23) , (word) (( (bPt) gf←c0208)+320)/* var←c21368 */ ); var←c22968 = (word) XR←ImportInterface((word) "Rope", (word) XR←GetTypeIndexS((word) (&string24)), 43); (* (( (ptr) gf←c0208)+86)/* var←c21752 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 68428293); (void) XR←ImportProcS(var←c22968, 67633666); (void) XR←ImportProcS(var←c22968, 67378689); var←c22968 = (word) XR←ImportInterface((word) "Finalize", (word) XR←GetTypeIndexS((word) (&string25)), 14); (* (( (ptr) gf←c0208)+87)/* var←c22040 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 67373057); var←c22968 = (word) XR←ImportInterface((word) "FinalizeOps", (word) XR←GetTypeIndexS((word) (&string26)), 7); (* (( (ptr) gf←c0208)+85)/* var←c21656 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 67634178); var←c22968 = (word) XR←ImportInterface((word) "VM", (word) XR←GetTypeIndexS((word) (&string27)), 19); (* (( (ptr) gf←c0208)+84)/* var←c21592 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 525057); (void) XR←ImportProcS(var←c22968, 134480129); var←c22968 = (word) XR←ImportInterface((word) "UnixSysCallExtensions", (word) XR←GetTypeIndexS((word) (&string28)), 1); (* (( (ptr) gf←c0208)+82)/* var←c21400 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 67371009); var←c22968 = (word) XR←ImportInterface((word) "Commander", (word) XR←GetTypeIndexS((word) (&string29)), 3); (* (( (ptr) gf←c0208)+83)/* var←c21528 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 1310725); var←c22968 = (word) XR←ImportInterface((word) "IO", (word) XR←GetTypeIndexS((word) (&string30)), 103); (* (( (ptr) gf←c0208)+88)/* var←c22936 */ ) = var←c22968; (void) XR←ImportProcS(var←c22968, 801795); var←c22968 = (word) XR←ExportInterface((word) "RopeFile", (word) XR←GetTypeIndexS((word) (&string31)), 7); (* (( (ptr) gf←c0208)+89)/* var←c23000 */ ) = var←c22968; (void) XR←ExportProcS(var←c22968, (word) (( (bPt) gf←c0208)+296)/* var←c21272 */ , 68681734); (void) XR←ExportVar(var←c22968, 1, (word) (( (bPt) gf←c0208)+148)/* var←c20664 */ ); (void) XR←ExportProcS(var←c22968, (word) (( (bPt) gf←c0208)+288)/* var←c21240 */ , 67633666); (void) XR←ExportProcS(var←c22968, (word) (( (bPt) gf←c0208)+160)/* var←c20728 */ , 263425); (void) XR←ExportProcS(var←c22968, (word) (( (bPt) gf←c0208)+232)/* var←c21016 */ , 263681); } static void RopeFileImpl←P0(formal←c047, formal←c045) word formal←c047; word formal←c045; { register ptr gf←c23032 = (ptr) &globalframe; /* RopeFileImpl: */ SOURCE(100, 11861) /* moved to installation proc */ /* moved to installation proc */ SOURCE(1119, 32) (* (( (ptr) gf←c23032)+10)/* flatTrigger2←v3168 */ ) = (* (( (ptr) gf←c23032)+9)/* flatTrigger1←v3140 */ ); SOURCE(1154, 62) { word pd32; word idx33; pd32 = (* (( (ptr) (* (( (ptr) gf←c23032)+82)/* var←c21400 */ ))+4) ); (* (( (ptr) gf←c23032)+11)/* filesMaxLimit←v3196 */ ) = ( idx33 = (word) ( *( (fPt) ((* (ptr) pd32 ))))(0, pd32), SGNCK(idx33) ); }; SOURCE(1218, 39) { word x34; (* (( (ptr) gf←c23032)+12)/* filesMax←v3224 */ ) = (x34 = ((* (( (ptr) gf←c23032)+11)/* filesMaxLimit←v3196 */ ) >> 2), MAX( (unsigned) , x34, 1)); }; SOURCE(1260, 27) (* (( (ptr) gf←c23032)+13)/* bufferLimit←v3252 */ ) = (* (( (ptr) gf←c23032)+12)/* filesMax←v3224 */ ); SOURCE(3171, 6) (* (( (ptr) gf←c23032)+14)/* head←v3364 */ ) = XR←NewObject(8, (* (( (ptr) gf←c23032)+17) )); { word var←c21464; var←c21464 = (* (( (ptr) gf←c23032)+14)/* head←v3364 */ ); }; SOURCE(8907, 35) (* (( (ptr) gf←c23032)+15)/* bufferHead←v3700 */ ) = XR←NewObject(28, (* (( (ptr) gf←c23032)+18) )); SOURCE(11863, 98) { word pd35; pd35 = (* (( (ptr) (* (( (ptr) gf←c23032)+83)/* var←c21528 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd35 ))))((* (( (ptr) gf←c23032)+36) ), (word) (( (bPt) gf←c23032)+152)/* var←c20696 */ , (* ( ( (ptr) gf←c23032)+35) ), 0, 1, pd35); }; } static word NewBuffer←P60() { register ptr gf←c23064 = (ptr) &globalframe; word var←c4284; W2 interval←v6728; word buffer←v6756; /* NewBuffer: */ SOURCE(662, 316) SOURCE(699, 71) { word var←c21560; { word idx36; var←c21560 = (word) XRM←BITRSHIFT((((* (ptr) (* (( (ptr) (* (( (ptr) gf←c23064)+84)/* var←c21592 */ ))+13) ) ) - 1) + 8192), ( idx36 = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c23064)+84)/* var←c21592 */ ))+14) ) ), BCK(idx36, 32) )); }; { word pd37; pd37 = (* (( (ptr) (* (( (ptr) gf←c23064)+84)/* var←c21592 */ ))+5) ); (void) ( *( (fPt) ((* (ptr) pd37 ))))((word) &interval←v6728, var←c21560, pd37); }; }; SOURCE(772, 31) buffer←v6756 = XR←NewObject(28, (* (( (ptr) gf←c23064)+18) )); SOURCE(805, 26) (* (W2Pt) (( (ptr) buffer←v6756)+4) ) = interval←v6728; SOURCE(833, 63) { word idx38; word idx39; (* (( (ptr) buffer←v6756)+3) ) = (word) XRM←BITLSHIFT(( idx38 = (word) interval←v6728.f0, SGNCK(idx38) ), ( idx39 = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c23064)+84)/* var←c21592 */ ))+16) ) ), BCK(idx39, 32) )); }; SOURCE(898, 62) { word var←c21688; word pd40; pd40 = (* (( (ptr) (* (( (ptr) gf←c23064)+85)/* var←c21656 */ ))+8) ); var←c21688 = (word) ( *( (fPt) ((* (ptr) pd40 ))))(buffer←v6756, (* (( (ptr) gf←c23064)+16)/* finalizationQueue←v3784 */ ), pd40) ; }; SOURCE(962, 16) return(buffer←v6756); } static word Flattery←P120(byteSequenceObject←v4344, start←v4372, len←v4400) word byteSequenceObject←v4344; word start←v4372; word len←v4400; { register ptr gf←c23096 = (ptr) &globalframe; word var←c4444; /* Flattery: */ SOURCE(1290, 575) SOURCE(1397, 468) { word var←c21720; var←c21720 = len←v4400; if ((var←c21720 <= (* (( (ptr) gf←c23096)+9)/* flatTrigger1←v3140 */ ))) { SOURCE(1432, 188) { word text←v6800; SOURCE(1434, 35) { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf←c23096)+86)/* var←c21752 */ ))+34) ); text←v6800 = (word) ( *( (fPt) ((* (ptr) pd41 ))))(BCK(len←v4400, 32768), pd41); }; SOURCE(1479, 123) SOURCE(1481, 119) { word var←c21816; { W3 var←c21784; var←c21784.f0 = text←v6800; var←c21784.f1 = 4; var←c21784.f2 = SGNCK(len←v4400); { word pd42; pd42 = (* (( (ptr) byteSequenceObject←v4344)+9) ); var←c21816 = (word) ( *( (fPt) ((* (ptr) pd42 ))))(byteSequenceObject←v4344, var←c21784, SGNCK(start←v4372), pd42); }; }; }; SOURCE(1605, 13) return(text←v6800); }; } else { SOURCE(1634, 233) { word half←v6844; word ret←v6872; SOURCE(1636, 34) half←v6844 = IOP2( / , (int)(len←v4400 - (len←v4400 & 017)), (int)2); SOURCE(1672, 53) ret←v6872 = (word) Flattery←P120(byteSequenceObject←v4344, start←v4372, SGNCK(half←v6844)); SOURCE(1758, 20) start←v4372 = (start←v4372 + half←v6844); SOURCE(1780, 16) len←v4400 = (len←v4400 - half←v6844); SOURCE(1798, 67) { word var←c21880; var←c21880 = (word) Flattery←P120(byteSequenceObject←v4344, start←v4372, len←v4400); { word pd43; pd43 = (* (( (ptr) (* (( (ptr) gf←c23096)+86)/* var←c21752 */ ))+6) ); return((word) ( *( (fPt) ((* (ptr) pd43 ))))(ret←v6872, var←c21880, pd43)); }; }; }; }; }; } static word CreateByteSequenceObject←P180(length←v4504, data←v4532, equal←v4560, deactivate←v4588, describe←v4616, move←v4644) word length←v4504; word data←v4532; word equal←v4560; word deactivate←v4588; word describe←v4616; word move←v4644; { register ptr gf←c23128 = (ptr) &globalframe; word var←c5308; word byteSequenceObject←v6916; /* CreateByteSequenceObject: */ SOURCE(1874, 773) SOURCE(2364, 177) byteSequenceObject←v6916 = XR←NewObject(40, (* (( (ptr) gf←c23128)+24) )); (* (( (ptr) byteSequenceObject←v6916)+4) ) = length←v4504; (* (( (ptr) byteSequenceObject←v6916)+5) ) = data←v4532; (* (( (ptr) byteSequenceObject←v6916)+6) ) = XR←CheckProc(equal←v4560); (* (( (ptr) byteSequenceObject←v6916)+7) ) = XR←CheckProc(deactivate←v4588); (* (( (ptr) byteSequenceObject←v6916)+8) ) = XR←CheckProc(describe←v4616); (* (( (ptr) byteSequenceObject←v6916)+9) ) = XR←CheckProc(move←v4644); SOURCE(2543, 74) { word var←c21944; word pd44; pd44 = (* (( (ptr) (* (( (ptr) gf←c23128)+85)/* var←c21656 */ ))+8) ); var←c21944 = (word) ( *( (fPt) ((* (ptr) pd44 ))))(byteSequenceObject←v6916, (* (( (ptr) gf←c23128)+16)/* finalizationQueue←v3784 */ ), pd44) ; }; SOURCE(2619, 28) return(byteSequenceObject←v6916); } static word FromByteSequenceObject←P240(byteSequenceObject←v5368, flatten←v5396) word byteSequenceObject←v5368; word flatten←v5396; { register ptr gf←c23160 = (ptr) &globalframe; word rope←v5440; word length←v6960; /* FromByteSequenceObject: */ SOURCE(2651, 508) SOURCE(2651, 508) rope←v5440 = 0; SOURCE(2776, 39) length←v6960 = (* (( (ptr) byteSequenceObject←v5368)+4) ); SOURCE(2817, 342) if ((0 != flatten←v5396) || (length←v6960 <= (* (( (ptr) gf←c23160)+10)/* flatTrigger2←v3168 */ ))) { SOURCE(2861, 46) rope←v5440 = (word) Flattery←P120(byteSequenceObject←v5368, 0, length←v6960); SOURCE(2909, 61) { word var←c21976; word pd45; pd45 = (* (( (ptr) byteSequenceObject←v5368)+7) ); var←c21976 = (word) ( *( (fPt) ((* (ptr) pd45 ))))(byteSequenceObject←v5368, 0, pd45); }; } else { SOURCE(2981, 34) rope←v5440 = (word) FindOld←P480(byteSequenceObject←v5368); SOURCE(3017, 142) if ((rope←v5440 == 0)) { SOURCE(3038, 109) { word pd46; pd46 = (* (( (ptr) (* (( (ptr) gf←c23160)+86)/* var←c21752 */ ))+38) ); rope←v5440 = (word) ( *( (fPt) ((* (ptr) pd46 ))))(byteSequenceObject←v5368, (* (( (ptr) byteSequenceObject←v5368)+4) ), (word) ( ( (bPt) gf←c23160)+224)/* var←c20984 */ , (word) (( (bPt) gf←c23160)+216)/* var←c20952 */ , (word) (( (bPt) gf←c23160)+208) /* var←c20920 */ , pd46); }; SOURCE(3149, 10) (void) Note←P300(rope←v5440); }; }; SOURCE(2651, 508) return(rope←v5440); } static void Note←P300(rope←v5584) word rope←v5584; { register ptr gf←c23192 = (ptr) &globalframe; word handle←v7004; /* Note: */ SOURCE(3214, 152) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23192)+16)/* LOCK←v2832 */ )); SOURCE(3248, 81) { word pd47; pd47 = (* (( (ptr) (* (( (ptr) gf←c23192)+85)/* var←c21656 */ ))+8) ); handle←v7004 = (word) ( *( (fPt) ((* (ptr) pd47 ))))(rope←v5584, (* (( (ptr) gf←c23192)+16)/* finalizationQueue←v3784 */ ), pd47) ; }; SOURCE(3331, 35) { word var←c22008; var←c22008 = XR←NewObject(8, (* (( (ptr) gf←c23192)+17) )); (* (ptr) var←c22008 ) = handle←v7004; (* (( (ptr) var←c22008)+1) ) = (* (( (ptr) (* (( (ptr) gf←c23192)+14)/* head←v3364 */ ))+1) ); (* (( (ptr) (* (( (ptr) gf←c23192)+14)/* head←v3364 */ ))+1) ) = var←c22008; }; SOURCE(3214, 152) (void) (XR←MonitorExit((word) (( (bPt) gf←c23192)+16)/* LOCK←v2832 */ )); return; } static void Touch←P360(byteSequenceObject←v5644) word byteSequenceObject←v5644; { register ptr gf←c23224 = (ptr) &globalframe; word prev←v7048; /* Touch: */ SOURCE(3372, 413) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23224)+16)/* LOCK←v2832 */ )); SOURCE(3435, 6) prev←v7048 = (* (( (ptr) gf←c23224)+14)/* head←v3364 */ ); SOURCE(3473, 312) { register word tail←v7176; tail←v7176 = (* (( (ptr) (* (( (ptr) gf←c23224)+14)/* head←v3364 */ ))+1) ); lab←L100003: ; if ((tail←v7176 != 0)) { } else { goto lab←L100000; }; SOURCE(3550, 209) { word var←c22072; { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf←c23224)+87)/* var←c22040 */ ))+12) ); var←c22072 = (word) ( *( (fPt) ((* (ptr) pd48 ))))((* (ptr) (tail←v7176) ), pd48); }; if ((var←c22072 == 0)) { goto lab←L100004; }; { word tc49; word tc50; if (((* (( (ptr) gf←c23224)+20) ) == XR←GetReferentType(var←c22072))) { if (((*(int*)var←c22072<0) == 0)) { tc50 = (word) ((*(( short *)var←c22072 + 1)<0) == 1); } else { tc50 = (word) 0; }; if (tc50) { tc49 = (word) (((* (( (bPt) var←c22072)+3) ) & 3) == 3); } else { tc49 = (word) 0; }; } else { tc49 = (word) 0; }; if (tc49) { { word object←v7304; object←v7304 = var←c22072; SOURCE(3645, 114) if (((* (( (ptr) object←v7304)+2) ) == byteSequenceObject←v5644)) { SOURCE(3688, 21) (* (( (ptr) prev←v7048)+1) ) = (* (( (ptr) tail←v7176)+1) ); SOURCE(3711, 21) (* (( (ptr) tail←v7176)+1) ) = (* (( (ptr) (* (( (ptr) gf←c23224)+14)/* head←v3364 */ ))+1) ); SOURCE(3734, 16) (* (( (ptr) (* (( (ptr) gf←c23224)+14)/* head←v3364 */ ))+1) ) = tail←v7176; SOURCE(3752, 7) (void) (XR←MonitorExit((word) (( (bPt) gf←c23224)+16)/* LOCK←v2832 */ )); return; }; }; } else { lab←L100004: ; }; }; }; SOURCE(3774, 11) prev←v7048 = tail←v7176; tail←v7176 = (* (( (ptr) tail←v7176)+1) ); goto lab←L100003; lab←L100000: ; }; SOURCE(3372, 413) (void) (XR←MonitorExit((word) (( (bPt) gf←c23224)+16)/* LOCK←v2832 */ )); return; } static void Remove←P420(handle←v5704) word handle←v5704; { register ptr gf←c23256 = (ptr) &globalframe; word prev←v7360; /* Remove: */ SOURCE(3800, 255) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23256)+16)/* LOCK←v2832 */ )); SOURCE(3849, 6) prev←v7360 = (* (( (ptr) gf←c23256)+14)/* head←v3364 */ ); SOURCE(3887, 168) { register word tail←v7488; tail←v7488 = (* (( (ptr) (* (( (ptr) gf←c23256)+14)/* head←v3364 */ ))+1) ); lab←L100008: ; if ((tail←v7488 != 0)) { } else { goto lab←L100005; }; SOURCE(3964, 77) if (((* (ptr) tail←v7488 ) == handle←v5704)) { SOURCE(3994, 21) (* (( (ptr) prev←v7360)+1) ) = (* (( (ptr) tail←v7488)+1) ); SOURCE(4017, 15) (* (( (ptr) tail←v7488)+1) ) = 0; SOURCE(4034, 7) (void) (XR←MonitorExit((word) (( (bPt) gf←c23256)+16)/* LOCK←v2832 */ )); return; }; SOURCE(4044, 11) prev←v7360 = tail←v7488; tail←v7488 = (* (( (ptr) tail←v7488)+1) ); goto lab←L100008; lab←L100005: ; }; SOURCE(3800, 255) (void) (XR←MonitorExit((word) (( (bPt) gf←c23256)+16)/* LOCK←v2832 */ )); return; } static word FindOld←P480(byteSequenceObject←v5764) word byteSequenceObject←v5764; { register ptr gf←c23288 = (ptr) &globalframe; word var←c5808; /* FindOld: */ SOURCE(4070, 479) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23288)+16)/* LOCK←v2832 */ )); SOURCE(4070, 479) var←c5808 = 0; SOURCE(4156, 393) { register word tail←v7616; tail←v7616 = (* (( (ptr) (* (( (ptr) gf←c23288)+14)/* head←v3364 */ ))+1) ); lab←L100012: ; if ((tail←v7616 != 0)) { } else { goto lab←L100009; }; SOURCE(4233, 316) { word var←c22104; { word pd51; pd51 = (* (( (ptr) (* (( (ptr) gf←c23288)+87)/* var←c22040 */ ))+12) ); var←c22104 = (word) ( *( (fPt) ((* (ptr) pd51 ))))((* (ptr) (tail←v7616) ), pd51); }; if ((var←c22104 == 0)) { goto lab←L100013; }; { word tc52; word tc53; if (((* (( (ptr) gf←c23288)+20) ) == XR←GetReferentType(var←c22104))) { if (((*(int*)var←c22104<0) == 0)) { tc53 = (word) ((*(( short *)var←c22104 + 1)<0) == 1); } else { tc53 = (word) 0; }; if (tc53) { tc52 = (word) (((* (( (bPt) var←c22104)+3) ) & 3) == 3); } else { tc52 = (word) 0; }; } else { tc52 = (word) 0; }; if (tc52) { { word rope←v7744; rope←v7744 = var←c22104; SOURCE(4326, 223) if (( (int)(* (( (ptr) rope←v7744)+1) ) == (int)(* (( (ptr) byteSequenceObject←v5764)+4) ))) { SOURCE(4374, 175) { word var←c22136; var←c22136 = (* (( (ptr) rope←v7744)+2) ); if ((var←c22136 == 0)) { goto lab←L100014; }; if (((* (( (ptr) gf←c23288)+24) ) == XR←GetReferentType(var←c22136))) { { /*1*/ word other←v7800; /*1*/ other←v7800 = var←c22136; SOURCE(4432, 117) /*1*/ { /*1*/ word tc54; /*1*/ word pd55; /*1*/ if (((* (( (ptr) byteSequenceObject←v5764)+6) ) == (* (( (ptr) other←v7800)+6) ))) { /*1*/ pd55 = (* (( (ptr) byteSequenceObject←v5764)+6) ); /*1*/ tc54 = (word) (0 != (word) ( *( (fPt) ((* (ptr) pd55 ))))(byteSequenceObject←v5764, other←v7800, pd55)); /*1*/ } /*1*/ else { /*1*/ tc54 = (word) 0; /*1*/ }; /*1*/ if (tc54) { SOURCE(4535, 14) /*1*/ (void) (XR←MonitorExit((word) (( (bPt) gf←c23288)+16)/* LOCK←v2832 */ )); /*1*/ return(rope←v7744); /*1*/ }; /*1*/ }; /*1*/ }; } else { lab←L100014: ; }; }; }; }; } else { lab←L100013: ; }; }; }; tail←v7616 = (* (( (ptr) tail←v7616)+1) ); goto lab←L100012; lab←L100009: ; }; SOURCE(4070, 479) (void) (XR←MonitorExit((word) (( (bPt) gf←c23288)+16)/* LOCK←v2832 */ )); return(var←c5808); } static word GetDeactivationTargets←P540(activeLimit←v5868) word activeLimit←v5868; { register ptr gf←c23320 = (ptr) &globalframe; word list←v5912; /* GetDeactivationTargets: */ SOURCE(4583, 511) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23320)+16)/* LOCK←v2832 */ )); SOURCE(4583, 511) list←v5912 = 0; SOURCE(4690, 404) { register word tail←v7844; tail←v7844 = (* (( (ptr) (* (( (ptr) gf←c23320)+14)/* head←v3364 */ ))+1) ); lab←L100018: ; if ((tail←v7844 != 0)) { } else { goto lab←L100015; }; SOURCE(4767, 327) { word var←c22168; { word pd56; pd56 = (* (( (ptr) (* (( (ptr) gf←c23320)+87)/* var←c22040 */ ))+12) ); var←c22168 = (word) ( *( (fPt) ((* (ptr) pd56 ))))((* (ptr) (tail←v7844) ), pd56); }; if ((var←c22168 == 0)) { goto lab←L100019; }; { word tc57; word tc58; if (((* (( (ptr) gf←c23320)+20) ) == XR←GetReferentType(var←c22168))) { if (((*(int*)var←c22168<0) == 0)) { tc58 = (word) ((*(( short *)var←c22168 + 1)<0) == 1); } else { tc58 = (word) 0; }; if (tc58) { tc57 = (word) (((* (( (bPt) var←c22168)+3) ) & 3) == 3); } else { tc57 = (word) 0; }; } else { tc57 = (word) 0; }; if (tc57) { { word object←v7972; object←v7972 = var←c22168; SOURCE(4862, 232) { word var←c22200; var←c22200 = (* (( (ptr) object←v7972)+2) ); if ((var←c22200 == 0)) { goto lab←L100020; }; if (((* (( (ptr) gf←c23320)+24) ) == XR←GetReferentType(var←c22200))) { { word byteSequenceObject←v8028; W3 var←c0104; word var←c0232; byteSequenceObject←v8028 = var←c22200; SOURCE(4935, 159) { /*1*/ word pd59; /*1*/ pd59 = (* (( (ptr) byteSequenceObject←v8028)+8) ); /*1*/ (void) ( *( (fPt) ((* (ptr) pd59 ))))((word) &var←c0104, byteSequenceObject←v8028, pd59); /*1*/ }; var←c0232 = var←c0104.f2; if ((0 != var←c0232)) { SOURCE(4998, 96) /*1*/ if (( (int)activeLimit←v5868 > (int)0)) { SOURCE(5022, 35) /*1*/ activeLimit←v5868 = (activeLimit←v5868 - 1); /*1*/ } /*1*/ else { SOURCE(5057, 37) /*1*/ { /*1*/ word var←c22232; /*1*/ var←c22232 = XR←NewObject(8, (* (( (ptr) gf←c23320)+25) )); /*1*/ (* (ptr) var←c22232 ) = byteSequenceObject←v8028; /*1*/ (* (( (ptr) var←c22232)+1) ) = list←v5912; /*1*/ list←v5912 = var←c22232; /*1*/ }; /*1*/ }; /*1*/ }; }; } else { lab←L100020: ; }; }; }; } else { lab←L100019: ; }; }; }; tail←v7844 = (* (( (ptr) tail←v7844)+1) ); goto lab←L100018; lab←L100015: ; }; SOURCE(4583, 511) (void) (XR←MonitorExit((word) (( (bPt) gf←c23320)+16)/* LOCK←v2832 */ )); return(list←v5912); } static word GetObjectList←P600() { register ptr gf←c23352 = (ptr) &globalframe; word list←v6056; /* GetObjectList: */ SOURCE(5136, 361) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23352)+16)/* LOCK←v2832 */ )); SOURCE(5136, 361) list←v6056 = 0; SOURCE(5215, 282) { register word tail←v8072; tail←v8072 = (* (( (ptr) (* (( (ptr) gf←c23352)+14)/* head←v3364 */ ))+1) ); lab←L100024: ; if ((tail←v8072 != 0)) { } else { goto lab←L100021; }; SOURCE(5292, 205) { word var←c22264; { word pd60; pd60 = (* (( (ptr) (* (( (ptr) gf←c23352)+87)/* var←c22040 */ ))+12) ); var←c22264 = (word) ( *( (fPt) ((* (ptr) pd60 ))))((* (ptr) (tail←v8072) ), pd60); }; if ((var←c22264 == 0)) { goto lab←L100025; }; { word tc61; word tc62; if (((* (( (ptr) gf←c23352)+20) ) == XR←GetReferentType(var←c22264))) { if (((*(int*)var←c22264<0) == 0)) { tc62 = (word) ((*(( short *)var←c22264 + 1)<0) == 1); } else { tc62 = (word) 0; }; if (tc62) { tc61 = (word) (((* (( (bPt) var←c22264)+3) ) & 3) == 3); } else { tc61 = (word) 0; }; } else { tc61 = (word) 0; }; if (tc61) { { word object←v8200; object←v8200 = var←c22264; SOURCE(5387, 110) { word var←c22296; var←c22296 = (* (( (ptr) object←v8200)+2) ); if ((var←c22296 == 0)) { goto lab←L100026; }; if (((* (( (ptr) gf←c23352)+24) ) == XR←GetReferentType(var←c22296))) { { word byteSequenceObject←v8256; byteSequenceObject←v8256 = var←c22296; SOURCE(5460, 37) { /*1*/ word var←c22328; /*1*/ var←c22328 = XR←NewObject(8, (* (( (ptr) gf←c23352)+25) )); /*1*/ (* (ptr) var←c22328 ) = byteSequenceObject←v8256; /*1*/ (* (( (ptr) var←c22328)+1) ) = list←v6056; /*1*/ list←v6056 = var←c22328; /*1*/ }; }; } else { lab←L100026: ; }; }; }; } else { lab←L100025: ; }; }; }; tail←v8072 = (* (( (ptr) tail←v8072)+1) ); goto lab←L100024; lab←L100021: ; }; SOURCE(5136, 361) (void) (XR←MonitorExit((word) (( (bPt) gf←c23352)+16)/* LOCK←v2832 */ )); return(list←v6056); } static void LimitActive←P660(activeLimit←v6200) word activeLimit←v6200; { word next←v8300 = 0; /* LimitActive: */ SOURCE(5536, 356) SOURCE(5624, 268) { register word list←v8428; list←v8428 = (word) GetDeactivationTargets←P540(activeLimit←v6200); lab←L100030: ; if ((list←v8428 != 0)) { } else { goto lab←L100027; }; { word byteSequenceObject←v8556; SOURCE(5725, 51) byteSequenceObject←v8556 = (* (ptr) list←v8428 ); SOURCE(5778, 16) (* (ptr) list←v8428 ) = 0; SOURCE(5796, 16) next←v8300 = (* (( (ptr) list←v8428)+1) ); SOURCE(5814, 15) (* (( (ptr) list←v8428)+1) ) = 0; SOURCE(5831, 61) { word var←c22360; word pd63; pd63 = (* (( (ptr) byteSequenceObject←v8556)+7) ); var←c22360 = (word) ( *( (fPt) ((* (ptr) pd63 ))))(byteSequenceObject←v8556, 0, pd63); }; }; list←v8428 = next←v8300; goto lab←L100030; lab←L100027: ; }; } static word RopeFileFetch←P720(data←v12476, index←v12504) word data←v12476; word index←v12504; { register ptr gf←c23384 = (ptr) &globalframe; word var←c12548; word byteSequenceObject←v8600; word buffer←v8628; word char←v8656; /* RopeFileFetch: */ SOURCE(5907, 274) SOURCE(5941, 53) byteSequenceObject←v8600 = XR←Narrow(data←v12476, (* (( (ptr) gf←c23384)+24) )); SOURCE(5996, 56) buffer←v8628 = (word) ObtainBuffer←P900(byteSequenceObject←v8600, index←v12504); SOURCE(6074, 47) SOURCE(6076, 45) char←v8656 = (word) (* (( (bPt) (* (( (ptr) buffer←v8628)+3) ))+(index←v12504 - (* (( (ptr) buffer←v8628)+1) ))) ); SOURCE(6124, 41) (void) ReleaseBuffer←P1020(byteSequenceObject←v8600, buffer←v8628); SOURCE(6167, 14) return(char←v8656); } static word RopeFileMap←P780(base←v12608, formal←c0238, formal←c0239, formal←c0240) word base←v12608; word formal←c0238; word formal←c0239; word formal←c0240; { W10 var←c23416; /* declaration of start←v12636 skipped */ /* declaration of len←v12664 skipped */ /* declaration of action←v12692 skipped */ register ptr gf←c23448 = (ptr) &globalframe; /* declaration of quit←v12736 skipped */ /* declaration of byteSequenceObject←v8700 skipped */ /* declaration of buffer←v8728 skipped */ (* (( (ptr) &var←c23416)+4)/* start←v12636 */ ) = formal←c0238; (* (( (ptr) &var←c23416)+5)/* len←v12664 */ ) = formal←c0239; (* (( (ptr) &var←c23416)+6)/* action←v12692 */ ) = formal←c0240; /* RopeFileMap: */ SOURCE(6185, 495) SOURCE(6185, 495) (* (( (ptr) &var←c23416)+7)/* quit←v12736 */ ) = 0; SOURCE(6215, 53) (* (( (ptr) &var←c23416)+8)/* byteSequenceObject←v8700 */ ) = XR←Narrow(base←v12608, (* (( (ptr) gf←c23448)+24) )); SOURCE(6270, 56) (* (( (ptr) &var←c23416)+9)/* buffer←v8728 */ ) = (word) ObtainBuffer←P900((* (( (ptr) &var←c23416)+8)/* byteSequenceObject←v8700 */ ), (* ( ( (ptr) &var←c23416)+4)/* start←v12636 */ )); SOURCE(6334, 288) { word var←c0233; var←c0233 = (word) &var←c23416; (void) (word) XR←Enable(( ((word) (fPt) NoName←Q3348) ), ( ((word) (fPt) NoName←Q3408) ), var←c0233); }; SOURCE(6639, 41) (void) ReleaseBuffer←P1020((* (( (ptr) &var←c23416)+8)/* byteSequenceObject←v8700 */ ), (* (( (ptr) &var←c23416)+9)/* buffer←v8728 */ )) ; SOURCE(6185, 495) return((* (( (ptr) &var←c23416)+7)/* quit←v12736 */ )); } static word NoName←Q3348(formal←c0222) word formal←c0222; { SOURCE(6398, 224) { register word i←v8772; register word noName←c22392; i←v8772 = (* (( (ptr) formal←c0222)+4) ); noName←c22392 = ((* (( (ptr) formal←c0222)+4) ) + (* (( (ptr) formal←c0222)+5) )); if (( (int)i←v8772 >= (int)noName←c22392)) { goto lab←L100033; }; lab←L100036: ; if ((0 == (* (( (ptr) formal←c0222)+7) ))) { } else { goto lab←L100033; }; SOURCE(6445, 113) if (( (int)i←v8772 >= (int)(* (( (ptr) (* (( (ptr) formal←c0222)+9) ))+2) ))) { SOURCE(6471, 41) (void) ReleaseBuffer←P1020((* (( (ptr) formal←c0222)+8) ), (* (( (ptr) formal←c0222)+9) )); SOURCE(6514, 44) (* (( (ptr) formal←c0222)+9) ) = (word) ObtainBuffer←P900((* (( (ptr) formal←c0222)+8) ), i←v8772); }; SOURCE(6571, 51) SOURCE(6573, 49) { word pd64; pd64 = (* (( (ptr) formal←c0222)+6) ); (* (( (ptr) formal←c0222)+7) ) = (word) ( *( (fPt) ((* (ptr) pd64 ))))((word) ((* (( (bPt) (* (( (ptr) (* (( (ptr) formal←c0222)+9) ))+3) ))+(i←v8772 - (* (( (ptr) (* (( (ptr) formal←c0222)+9) ))+1) ))) )), pd64); }; i←v8772 = (i←v8772 + 1); if (( (int)i←v8772 < (int)noName←c22392)) { goto lab←L100036; }; lab←L100033: ; }; return(0); } static word RopeFileMove←P840(block←v12796, data←v12824, start←v12852) W3 block←v12796; word data←v12824; word start←v12852; { register ptr gf←c23480 = (ptr) &globalframe; word charsMoved←v12896; word byteSequenceObject←v8816; /* RopeFileMove: */ SOURCE(6686, 1300) SOURCE(6686, 1300) charsMoved←v12896 = 0; SOURCE(6728, 53) byteSequenceObject←v8816 = XR←Narrow(data←v12824, (* (( (ptr) gf←c23480)+24) )); SOURCE(7233, 639) if (( (int)block←v12796.f2 >= (int)8192)) { SOURCE(7267, 607) { word wasAlreadyActive←v8948; W3 var←c0139; word buffer←v8976; SOURCE(7269, 77) { word pd65; pd65 = (* (( (ptr) byteSequenceObject←v8816)+8) ); (void) ( *( (fPt) ((* (ptr) pd65 ))))((word) &var←c0139, byteSequenceObject←v8816, pd65); }; wasAlreadyActive←v8948 = var←c0139.f2; SOURCE(7348, 60) buffer←v8976 = (word) FindBuffer←P960(byteSequenceObject←v8816, start←v12852, 1); SOURCE(7456, 50) if ((buffer←v8976 != 0)) { SOURCE(7479, 27) { word transfer←v9108; { word x66; word x67; transfer←v9108 = (x66 = block←v12796.f2, x67 = ((* (( (ptr) buffer←v8976)+2) ) - start←v12852), MIN((int)(word), x66, x67)); }; SOURCE(6900, 137) { word idx68; (void) Basics←MoveBytes(block←v12796.f0, ( idx68 = (word) block←v12796.f1, SGNCK(idx68) ), (* (( (ptr) buffer←v8976)+3) ), (start←v12852 - (* (( (ptr) buffer←v8976)+1) )), SGNCK(transfer←v9108)); }; SOURCE(7039, 46) block←v12796.f1 = (block←v12796.f1 + transfer←v9108); SOURCE(7087, 36) block←v12796.f2 = (block←v12796.f2 - transfer←v9108); SOURCE(7125, 24) start←v12852 = (start←v12852 + transfer←v9108); SOURCE(7151, 34) charsMoved←v12896 = (charsMoved←v12896 + transfer←v9108); SOURCE(7187, 41) (void) ReleaseBuffer←P1020(byteSequenceObject←v8816, buffer←v8976); }; }; SOURCE(7519, 273) { word moved←v9020; SOURCE(7521, 133) { W3 var←c22424; var←c22424.f0 = block←v12796.f0; var←c22424.f1 = block←v12796.f1; var←c22424.f2 = block←v12796.f2; { word pd69; pd69 = (* (( (ptr) byteSequenceObject←v8816)+9) ); moved←v9020 = (word) ( *( (fPt) ((* (ptr) pd69 ))))(byteSequenceObject←v8816, var←c22424, start←v12852, pd69); }; }; SOURCE(7656, 43) block←v12796.f1 = (block←v12796.f1 + moved←v9020); SOURCE(7701, 33) block←v12796.f2 = (block←v12796.f2 - moved←v9020); SOURCE(7736, 21) start←v12852 = (start←v12852 + moved←v9020); SOURCE(7759, 31) charsMoved←v12896 = (charsMoved←v12896 + moved←v9020); }; SOURCE(7795, 25) (void) Touch←P360(byteSequenceObject←v8816); SOURCE(7822, 50) if ((0 == wasAlreadyActive←v8948)) { SOURCE(7851, 21) (void) LimitActive←P660((* ((( (ptr) gf←c23480)+12)/* filesMax←v3224 */ ) )); }; }; }; SOURCE(7877, 109) lab←L100039: ; if (( (int)block←v12796.f2 != (int)0)) { } else { goto lab←L100037; }; { word buffer←v9064; SOURCE(7902, 56) buffer←v9064 = (word) ObtainBuffer←P900(byteSequenceObject←v8816, start←v12852); SOURCE(7960, 26) { word transfer←v20604; { word x70; word x71; transfer←v20604 = (x70 = block←v12796.f2, x71 = ((* (( (ptr) buffer←v9064)+2) ) - start←v12852), MIN((int)(word), x70, x71)); }; SOURCE(6900, 137) { word idx72; (void) Basics←MoveBytes(block←v12796.f0, ( idx72 = (word) block←v12796.f1, SGNCK(idx72) ), (* (( (ptr) buffer←v9064)+3) ), (start←v12852 - (* (( (ptr) buffer←v9064)+1) )), SGNCK(transfer←v20604)); }; SOURCE(7039, 46) block←v12796.f1 = (block←v12796.f1 + transfer←v20604); SOURCE(7087, 36) block←v12796.f2 = (block←v12796.f2 - transfer←v20604); SOURCE(7125, 24) start←v12852 = (start←v12852 + transfer←v20604); SOURCE(7151, 34) charsMoved←v12896 = (charsMoved←v12896 + transfer←v20604); SOURCE(7187, 41) (void) ReleaseBuffer←P1020(byteSequenceObject←v8816, buffer←v9064); }; }; goto lab←L100039; lab←L100037: ; SOURCE(6686, 1300) return(charsMoved←v12896); } static word ObtainBuffer←P900(byteSequenceObject←v6260, index←v6288) word byteSequenceObject←v6260; word index←v6288; { register ptr gf←c23512 = (ptr) &globalframe; word buffer←v6332; /* ObtainBuffer: */ SOURCE(8001, 897) SOURCE(8001, 897) buffer←v6332 = 0; SOURCE(8102, 46) buffer←v6332 = (word) FindBuffer←P960(byteSequenceObject←v6260, index←v6288, 0); SOURCE(8150, 41) if ((buffer←v6332 == 0)) { SOURCE(8171, 20) buffer←v6332 = (word) NewBuffer←P60(); }; SOURCE(8193, 705) if (((* (ptr) buffer←v6332 ) != byteSequenceObject←v6260) || ( ( (int)index←v6288 < (int)(* (( (ptr) buffer←v6332)+1) )) ? 1 : ( (int)index←v6288 >= (int)(* ( ( (ptr) buffer←v6332)+2) )) ) ) { SOURCE(8298, 602) { word wasAlreadyActive←v9136; W3 var←c0150; SOURCE(8300, 77) { word pd73; pd73 = (* (( (ptr) byteSequenceObject←v6260)+8) ); (void) ( *( (fPt) ((* (ptr) pd73 ))))((word) &var←c0150, byteSequenceObject←v6260, pd73); }; wasAlreadyActive←v9136 = var←c0150.f2; SOURCE(8379, 46) (* (ptr) buffer←v6332 ) = byteSequenceObject←v6260; SOURCE(8427, 54) (* (( (ptr) buffer←v6332)+1) ) = ((word) ((word) SGNCK(index←v6288) >> 13) << 13); SOURCE(8483, 70) { word x74; word x75; (* (( (ptr) buffer←v6332)+2) ) = (x74 = ((* (( (ptr) buffer←v6332)+1) ) + 8192), x75 = (* (( (ptr) byteSequenceObject←v6260)+4) ), MIN((int)(word), x74, x75)); }; SOURCE(8563, 255) { word moved←v9180; SOURCE(8565, 139) { W3 var←c22456; var←c22456.f0 = (* (( (ptr) buffer←v6332)+3) ); var←c22456.f1 = 0; var←c22456.f2 = ((* (( (ptr) buffer←v6332)+2) ) - (* (( (ptr) buffer←v6332)+1) )); { word pd76; pd76 = (* (( (ptr) byteSequenceObject←v6260)+9) ); moved←v9180 = (word) ( *( (fPt) ((* (ptr) pd76 ))))(byteSequenceObject←v6260, var←c22456, (* (( (ptr) buffer←v6332)+1) ), pd76) ; }; }; SOURCE(8706, 110) if (( (int)((* (( (ptr) buffer←v6332)+1) ) + moved←v9180) != (int)(* (( (ptr) buffer←v6332)+2) ))) { SOURCE(8746, 70) { W2 var←c0153; (* (ptr) (word) &var←c0153 ) = (* (( (ptr) gf←c23512)+34) ); (* (( (ptr) (word) &var←c0153) + 1) ) = (* (( (ptr) gf←c23512)+33) ); (void) XR←RaiseError((word) (( (bPt) gf←c23512)+148)/* var←c20664 */ , (word) &var←c0153); }; }; }; SOURCE(8821, 25) (void) Touch←P360(byteSequenceObject←v6260); SOURCE(8848, 50) if ((0 == wasAlreadyActive←v9136)) { SOURCE(8877, 21) (void) LimitActive←P660((* ((( (ptr) gf←c23512)+12)/* filesMax←v3224 */ ) )); }; }; }; SOURCE(8001, 897) return(buffer←v6332); } static word FindBuffer←P960(byteSequenceObject←v6392, index←v6420, exact←v6448) word byteSequenceObject←v6392; word index←v6420; word exact←v6448; { register ptr gf←c23544 = (ptr) &globalframe; word var←c6492; word nBuffers←v9224 = 0; word prev←v9252; word prevPrev←v9280 = 0; word preTarget←v9308 = 0; /* FindBuffer: */ SOURCE(8945, 857) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); SOURCE(9082, 25) prev←v9252 = (* (( (ptr) gf←c23544)+15)/* bufferHead←v3700 */ ); SOURCE(9158, 320) lab←L100042: ; if (((* (( (ptr) prev←v9252)+6) ) != 0)) { } else { goto lab←L100040; }; { word this←v9352; SOURCE(9183, 24) this←v9352 = (* (( (ptr) prev←v9252)+6) ); SOURCE(9209, 54) if (((* (ptr) this←v9352 ) == 0)) { SOURCE(9247, 16) preTarget←v9308 = prev←v9252; }; SOURCE(9265, 152) if ( ( ((* (ptr) this←v9352 ) == byteSequenceObject←v6392) ? ( ( (int)index←v6420 >= (int)(* (( (ptr) this←v9352)+1) )) ? ( (int)index←v6420 < (int)(* ( ( (ptr) this←v9352)+2) )) : 0 ) : 0 ) ) { SOURCE(9358, 26) (* (( (ptr) prev←v9252)+6) ) = (* (( (ptr) (* (( (ptr) prev←v9252)+6) ))+6) ); SOURCE(9386, 15) (* (( (ptr) this←v9352)+6) ) = 0; SOURCE(9403, 14) (void) (XR←MonitorExit((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); return(this←v9352); }; SOURCE(9420, 23) nBuffers←v9224 = (nBuffers←v9224 + 1); SOURCE(9445, 15) prevPrev←v9280 = prev←v9252; SOURCE(9462, 16) prev←v9252 = (* (( (ptr) prev←v9252)+6) ); }; goto lab←L100042; lab←L100040: ; SOURCE(9489, 26) if ((0 != exact←v6448)) { SOURCE(9503, 12) (void) (XR←MonitorExit((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); return(0); }; SOURCE(9517, 126) if ((preTarget←v9308 != 0)) { SOURCE(9541, 102) { word this←v9396; SOURCE(9543, 29) this←v9396 = (* (( (ptr) preTarget←v9308)+6) ); SOURCE(9574, 36) (* (( (ptr) preTarget←v9308)+6) ) = (* (( (ptr) (* (( (ptr) preTarget←v9308)+6) ))+6) ); SOURCE(9612, 15) (* (( (ptr) this←v9396)+6) ) = 0; SOURCE(9629, 14) (void) (XR←MonitorExit((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); return(this←v9396); }; }; SOURCE(9646, 156) if (( (int)nBuffers←v9224 < (int)(* (( (ptr) gf←c23544)+13)/* bufferLimit←v3252 */ )) || (prevPrev←v9280 == 0)) { SOURCE(9695, 18) (void) (XR←MonitorExit((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); return(0); } else { SOURCE(9713, 89) { word this←v9440; SOURCE(9715, 19) this←v9440 = prev←v9252; SOURCE(9767, 19) (* (( (ptr) prevPrev←v9280)+6) ) = 0; SOURCE(9788, 14) (void) (XR←MonitorExit((word) (( (bPt) gf←c23544)+16)/* LOCK←v2832 */ )); return(this←v9440); }; }; } static void ReleaseBuffer←P1020(byteSequenceObject←v6552, buffer←v6580) word byteSequenceObject←v6552; word buffer←v6580; { register ptr gf←c23576 = (ptr) &globalframe; /* ReleaseBuffer: */ SOURCE(9809, 225) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23576)+16)/* LOCK←v2832 */ )); SOURCE(9896, 76) if (((* (( (ptr) buffer←v6580)+6) ) != 0) || ((* (ptr) buffer←v6580 ) != byteSequenceObject←v6552)) { SOURCE(9972, 5) (void) XR←RaiseUnnamedError(); }; SOURCE(9979, 29) (* (( (ptr) buffer←v6580)+6) ) = (* (( (ptr) (* (( (ptr) gf←c23576)+15)/* bufferHead←v3700 */ ))+6) ); SOURCE(10010, 24) (* (( (ptr) (* (( (ptr) gf←c23576)+15)/* bufferHead←v3700 */ ))+6) ) = buffer←v6580; SOURCE(9809, 225) (void) (XR←MonitorExit((word) (( (bPt) gf←c23576)+16)/* LOCK←v2832 */ )); return; } static void Finalizer←P1080(handle←v12956, object←v12984) word handle←v12956; word object←v12984; { register ptr gf←c23608 = (ptr) &globalframe; /* Finalizer: */ SOURCE(10104, 524) SOURCE(10144, 484) { word var←c22488; word var←c22520; var←c22488 = object←v12984; if ((var←c22488 == 0)) { goto lab←L100043; }; var←c22520 = XR←GetReferentType(var←c22488); { word tc78; word tc79; if (((* (( (ptr) gf←c23608)+20) ) == var←c22520)) { if (((*(int*)var←c22488<0) == 0)) { tc79 = (word) ((*(( short *)var←c22488 + 1)<0) == 1); } else { tc79 = (word) 0; }; if (tc79) { tc78 = (word) (((* (( (bPt) var←c22488)+3) ) & 3) == 3); } else { tc78 = (word) 0; }; } else { tc78 = (word) 0; }; if (tc78) { { word object←v9484; object←v9484 = var←c22488; SOURCE(10210, 14) (void) Remove←P420(handle←v12956); SOURCE(10226, 167) { word var←c22552; var←c22552 = (* (( (ptr) object←v9484)+2) ); if ((var←c22552 == 0)) { goto lab←L100044; }; if (((* (( (ptr) gf←c23608)+24) ) == XR←GetReferentType(var←c22552))) { { word byteSequenceObject←v9540; byteSequenceObject←v9540 = var←c22552; SOURCE(10299, 31) (void) KillBuffers←P1140(byteSequenceObject←v9540); SOURCE(10332, 61) { word var←c22584; word pd80; pd80 = (* (( (ptr) byteSequenceObject←v9540)+7) ); var←c22584 = (word) ( *( (fPt) ((* (ptr) pd80 ))))(byteSequenceObject←v9540, 0, pd80); }; }; } else { lab←L100044: ; }; }; }; goto endif077; }; if (((* (( (ptr) gf←c23608)+18) ) == var←c22520)) { { word buffer←v9584; buffer←v9584 = var←c22488; SOURCE(10428, 18) (* (( (ptr) buffer←v9584)+3) ) = 0; SOURCE(10456, 27) SOURCE(10458, 25) { word pd81; pd81 = (* (( (ptr) (* (( (ptr) gf←c23608)+84)/* var←c21592 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd81 ))))((* (W2Pt) ((( (ptr) buffer←v9584)+4)) ), pd81); }; SOURCE(10486, 33) (* (( (ptr) buffer←v9584)+4) ) = 0; (* (( (ptr) buffer←v9584)+5) ) = 0; }; goto endif077; }; if (((* (( (ptr) gf←c23608)+24) ) == var←c22520)) { { word byteSequenceObject←v9628; byteSequenceObject←v9628 = var←c22488; SOURCE(10568, 60) { word var←c22616; word pd82; pd82 = (* (( (ptr) byteSequenceObject←v9628)+7) ); var←c22616 = (word) ( *( (fPt) ((* (ptr) pd82 ))))(byteSequenceObject←v9628, 1, pd82); }; }; goto endif077; }; lab←L100043: ; goto endif077; endif077: ; }; }; } static void KillBuffers←P1140(byteSequenceObject←v6640) word byteSequenceObject←v6640; { register ptr gf←c23640 = (ptr) &globalframe; /* KillBuffers: */ SOURCE(10646, 227) (void) (XR←MonitorEntry((word) (( (bPt) gf←c23640)+16)/* LOCK←v2832 */ )); SOURCE(10715, 158) { register word buffer←v9672; buffer←v9672 = (* (( (ptr) (* (( (ptr) gf←c23640)+15)/* bufferHead←v3700 */ ))+6) ); lab←L100048: ; if ((buffer←v9672 != 0)) { } else { goto lab←L100045; }; SOURCE(10787, 86) if (((* (ptr) buffer←v9672 ) == byteSequenceObject←v6640)) { SOURCE(10842, 31) (* (ptr) buffer←v9672 ) = 0; }; buffer←v9672 = (* (( (ptr) buffer←v9672)+6) ); goto lab←L100048; lab←L100045: ; }; SOURCE(10646, 227) (void) (XR←MonitorExit((word) (( (bPt) gf←c23640)+16)/* LOCK←v2832 */ )); return; } static void Deactivate←P1200(rope←v6700) word rope←v6700; { register ptr gf←c23672 = (ptr) &globalframe; /* Deactivate: */ SOURCE(10888, 462) SOURCE(10929, 421) { word var←c22648; var←c22648 = rope←v6700; if ((var←c22648 == 0)) { goto lab←L100049; }; if (((*(( short *)var←c22648 + 1)<0) == 1)) { { word x←v9716; x←v9716 = var←c22648; SOURCE(10987, 363) SOURCE(10989, 337) { word var←c22680; var←c22680 = ((* (( (bPt) x←v9716)+3) ) & 3); switch (var←c22680) { case 0: SOURCE(11021, 18) (void) Deactivate←P1200((* ((( (ptr) x←v9716)+2)) )); break; case 1: SOURCE(11053, 18) (void) Deactivate←P1200((* ((( (ptr) x←v9716)+2)) )); SOURCE(11073, 19) (void) Deactivate←P1200((* ((( (ptr) x←v9716)+3)) )); break; case 2: SOURCE(11108, 18) (void) Deactivate←P1200((* ((( (ptr) x←v9716)+2)) )); SOURCE(11128, 22) (void) Deactivate←P1200((* ((( (ptr) x←v9716)+3)) )); break; case 3: SOURCE(11163, 163) if (((* (( (ptr) x←v9716)+3) ) == (word) (( (bPt) gf←c23672)+224)/* var←c20984 */ )) { SOURCE(11197, 129) { word var←c22712; var←c22712 = (* (( (ptr) x←v9716)+2) ); if ((var←c22712 == 0)) { /*1*/ goto lab←L100050; /*1*/ }; if (((* (( (ptr) gf←c23672)+24) ) == XR←GetReferentType(var←c22712))) { /*1*/ { /*1*/ word byteSequenceObject←v9772; /*1*/ byteSequenceObject←v9772 = var←c22712; SOURCE(11265, 61) /*1*/ { /*1*/ word var←c22744; /*1*/ word pd83; /*1*/ pd83 = (* (( (ptr) byteSequenceObject←v9772)+7) ); /*1*/ var←c22744 = (word) ( *( (fPt) ((* (ptr) pd83 ))))(byteSequenceObject←v9772, 0, pd83); /*1*/ }; /*1*/ }; /*1*/ } else { /*1*/ lab←L100050: ; /*1*/ }; }; }; break; }; }; }; } else { lab←L100049: ; }; }; } static void RopeFilesCommand←P1260(formal←c0195, formal←c0241) word formal←c0195; word formal←c0241; { W8 var←c23704; /* declaration of cmd←v13044 skipped */ word result←v13088; word msg←v13116; /* declaration of var←c22776 skipped */ var←c23704.f4/* cmd←v13044 */ = formal←c0241; /* RopeFilesCommand: */ SOURCE(11366, 482) { word tmpAddr84; tmpAddr84 = (word) (( (ptr) &var←c23704)+5)/* var←c22776 */ ; (* (ptr) tmpAddr84 ) = ( ((word) (fPt) P←P3012) ); (* (( (ptr) tmpAddr84) + 1) ) = 1; }; SOURCE(11366, 482) result←v13088 = 0; SOURCE(11366, 482) msg←v13116 = 0; SOURCE(11410, 438) { register word tail←v9816; tail←v9816 = (word) GetObjectList←P600(); lab←L100055: ; if ((tail←v9816 != 0)) { } else { goto lab←L100052; }; { /* declaration of byteSequenceObject←v9944 skipped */ SOURCE(11496, 51) var←c23704.f7/* byteSequenceObject←v9944 */ = (* (ptr) tail←v9816 ); SOURCE(11785, 63) { W3 var←c22808; { word pd85; pd85 = (* (( (ptr) var←c23704.f7/* byteSequenceObject←v9944 */ )+8) ); (void) ( *( (fPt) ((* (ptr) pd85 ))))((word) &var←c22808, var←c23704.f7/* byteSequenceObject←v9944 */ , pd85); }; (void) P←P3012(var←c22808.f0, var←c22808.f1, var←c22808.f2, (word) (( (bPt) &var←c23704)+20)/* var←c22776 */ ); }; }; tail←v9816 = (* (( (ptr) tail←v9816)+1) ); goto lab←L100055; lab←L100052: ; }; /* removed tail goto */ (* (ptr) formal←c0195 ) = result←v13088; (* (( (ptr) formal←c0195)+1) ) = msg←v13116; return; } static void P←P3012(fileName←v10048, created←v10076, open←v10104, formal←c23768) word fileName←v10048; word created←v10076; word open←v10104; word formal←c23768; { register ptr gf←c23736 = (ptr) &globalframe; word status←v10132; formal←c23768 = (formal←c23768 - 20); /* P: */ SOURCE(11549, 9) SOURCE(11605, 40) status←v10132 = ( (0 != open←v10104) ? (* (( (ptr) gf←c23736)+30) ) : (* (( (ptr) gf←c23736)+31) ) ) ; SOURCE(11647, 133) { word var←c22840; { word var←c22872; word var←c22904; var←c22872 = XR←NewObject(12, (* (( (ptr) gf←c23736)+29) )); var←c22904 = var←c22872; (* (ptr) var←c22904 ) = 11; (* (( (ptr) var←c22904)+1) ) = fileName←v10048; (* (( (ptr) var←c22904)+2) ) = XR←NewObject(12, (* (( (ptr) gf←c23736)+29) )); var←c22904 = (* (( (ptr) var←c22904)+2) ); (* (ptr) var←c22904 ) = 11; (* (( (ptr) var←c22904)+1) ) = status←v10132; (* (( (ptr) var←c22904)+2) ) = XR←NewObject(12, (* (( (ptr) gf←c23736)+29) )); var←c22904 = (* (( (ptr) var←c22904)+2) ); (* (ptr) var←c22904 ) = 5; (* (( (ptr) var←c22904)+1) ) = (* (( (ptr) (* (( (ptr) formal←c23768)+7) ))+4) ); (* (( (ptr) var←c22904)+2) ) = XR←NewObject(12, (* (( (ptr) gf←c23736)+29) )); var←c22904 = (* (( (ptr) var←c22904)+2) ); (* (ptr) var←c22904 ) = 11; (* (( (ptr) var←c22904)+1) ) = created←v10076; var←c22840 = var←c22872; }; { word pd86; pd86 = (* (( (ptr) (* (( (ptr) gf←c23736)+88)/* var←c22936 */ ))+64) ); (void) ( *( (fPt) ((* (ptr) pd86 ))))((* (( (ptr) (* (( (ptr) formal←c23768)+4) ))+1) ), (* (( (ptr) gf←c23736)+32) ), var←c22840, pd86) ; }; }; } static void NoName←Q3408(formal←c0207, formal←c200000, formal←c200001, formal←c200002, formal←c200003) word formal←c0207; word formal←c200000; word formal←c200001; word formal←c200002; word formal←c200003; { if ((formal←c200001 == XR←Unwind)) { SOURCE(6353, 42) (void) ReleaseBuffer←P1020((* (( (ptr) formal←c200000)+8) ), (* (( (ptr) formal←c200000)+9) )); }; (* (ptr) formal←c0207 ) = 0; (* (( (ptr) formal←c0207)+1) ) = 0; return; } /* file: RopeFileImpl, module: RopeFileImpl, compiled at: January 27, 1993 4:57:19 pm PST */ extern void XR←install←RopeFileImpl() { NoName←Q3288(); } extern void XR←run←RopeFileImpl() { XR←Start(&globalframe); }