/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: February 28, 1992 10:40:03 am PST */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: TEditMouseImpl, module: TEditMouseImpl */ /* switches: bcfhklnouw */ #include #include static char versionStamp[] = "@(#)mob_version [2573449505,2079797981] TEditMouseImpl"; 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 {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef struct {W8 f; W7 r;} W15; typedef struct {word f0, f1;} W2; typedef struct {word f0, f1, f2, f3;} W4; typedef struct {word f0, f1, f2;} W3; typedef struct {W8 f; W3 r;} W11; typedef struct {W8 f; word r;} W9; typedef W9 *W9Pt; typedef W2 *W2Pt; typedef struct {W8 f; W4 r;} W12; typedef struct {word f0, f1, f2, f3, f4;} W5; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; #define SOURCE(p, l) /* source p, l */ #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR_RaiseBoundsFault()) : (idx) ) #define MAX(cast, x, y) ( ( cast x) > ( cast y) ? (x) : (y) ) #define IOP2(op, x, y) ( (word) ((x) op (y)) ) #define SGNCK(i) ((int) (word) (i) < 0 ? XR_RaiseArithmeticFault(): i ) #define MIN(cast, x, y) ( ( cast x) < ( cast y) ? (x) : (y) ) static void NoName_Q4644(); static void TEditMouseImpl_P0(); static void DoSelect_P60(); static word NoName_Q4704(); static void action_P1440(); static void inner_P1500(); static word NoName_Q4764(); static void SelectPoint_P180(); static void DoSelectPoint_P1608(); static void SelectChar_P240(); static void DoSelectChar_P1668(); static void SelectWord_P300(); static void DoSelectWord_P1728(); static void SelectNode_P360(); static void DoSelectNode_P1788(); static void SelectBranch_P420(); static void DoSelectBranch_P1848(); static word Dist_P480(); static word CompareLoc_P540(); static void Extend_P600(); static void DoExtend_P1968(); static void SetSelLooks_P660(); static void Update_P720(); static void ExpandToWord_P780(); static word SetInsertion_P840(); static word ResolveToChar_P900(); static void GrowSelectionToBlanks_P960(); static word Blank_P2220(); static void GrowSelectionToSomething_P1020(); static void GrowSelection_P1080(); static void InsertionPoint_P1140(); static word GetSelectionGrain_P1200(); static void InvalidateLineCache_P1260(); static void GetLine_P1320(); static void CharPositionInCachedLine_P1380(); static void NoName_Q4824(); static void NoName_Q4884(); static struct {unsigned f; char r[16];} string1 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\343\357\262\137\300\144\166\356\317\100\164\000\000"}; static struct {unsigned f; char r[16];} string4 = {851981, "\006\005\000\001\004\001\054\001\070\001\100\114\001\000\000"}; static struct {unsigned f; char r[4];} string5 = {131076, "\216\251\000"}; static struct {unsigned f; char r[12];} string6 = {589836, "StyleKind\000\000"}; static struct {unsigned f; char r[12];} string7 = {524300, "DoSelect\000\000\000"}; static struct {unsigned f; char r[8];} string8 = {327688, "Print\000\000"}; static struct {unsigned f; char r[16];} string9 = {851984, "\257\300\231\143\271\041\300\173\367\062\335\100\164\000\000"}; static struct {unsigned f; char r[20];} string10 = {1114129, "\006\006\040\001\050\001\060\001\070\001\100\100\001\100\144\004\007\000\000"}; static struct {unsigned f; char r[16];} string11 = {851984, "\257\300\314\212\213\004\300\112\342\014\072\100\164\000\000"}; static struct {unsigned f; char r[16];} string12 = {851984, "\257\300\004\173\141\246\300\255\256\170\002\100\150\000\000"}; static struct {unsigned f; char r[16];} string13 = {851984, "\257\300\375\366\273\111\300\156\046\321\053\100\150\000\000"}; static struct {unsigned f; char r[16];} string14 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"}; static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\366\233\214\046\300\233\036\213\260\100\150\000\000"}; static struct {unsigned f; char r[16];} string16 = {851984, "\257\300\013\141\323\354\300\341\005\243\127\100\150\000\000"}; static struct {unsigned f; char r[16];} string17 = {851984, "\257\300R-\356\251\300YX]$@h\000\000"}; static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\353\351\362\137\300\156\374\044\211\100\150\000\000"}; static struct {unsigned f; char r[12];} string19 = {1413833833, "tSelection"}; static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\343\112\327\166\300\041\341\335\211\100\150\000\000"}; static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\174\107\267\236\300\027\127\205\140\100\150\000\000"}; static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\261\010\310\246\300\337\340\027\051\100\150\000\000"}; static struct {unsigned f; char r[16];} string23 = {851984, "\257\3004+\202s\300vm?\203@h\000\000"}; static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\042\224\360\026\300\243\254\175\360\100\150\000\000"}; static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\304\277\342\227\300\257\071\007\130\100\150\000\000"}; static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\354\332\367\333\300\361\203\205\173\100\150\000\000"}; static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\334\224\340\220\300\346\355\242\107\100\150\000\000"}; static struct {unsigned f; char r[16];} string28 = {851984, "\257\300\354\107\165\331\300\073\134\140\272\100\150\000\000"}; static struct { word f0[13]; word f13; word f14[14]; 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; 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[17]; } globalframe = { {0}, 7, {0}, (word) CharPositionInCachedLine_P1380, 0, (word) GetLine_P1320, 0, (word) InvalidateLineCache_P1260, 0, (word) GetSelectionGrain_P1200, 0, (word) InsertionPoint_P1140, 0, (word) GrowSelection_P1080, 0, (word) GrowSelectionToSomething_P1020, 0, (word) GrowSelectionToBlanks_P960, 0, (word) ResolveToChar_P900, 0, (word) SetInsertion_P840, 0, (word) ExpandToWord_P780, 0, (word) Update_P720, 0, (word) SetSelLooks_P660, 0, (word) Extend_P600, 0, (word) CompareLoc_P540, 0, (word) Dist_P480, 0, (word) SelectBranch_P420, 0, (word) SelectNode_P360, 0, (word) SelectWord_P300, 0, (word) SelectChar_P240, 0, (word) SelectPoint_P180, 0, (word) DoSelect_P60, 0, (word) TEditMouseImpl_P0, {0} }; static void NoName_Q4644() { register ptr gf_c0374 = (ptr) &globalframe; word var_c37060; (* (( (ptr) gf_c0374)+20) ) = (word) XR_GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf_c0374)+22) ) = (word) XR_GetTypeIndex((word) &string3, 0, (word) &string4); (* (( (ptr) gf_c0374)+24) ) = (word) XR_GetTypeIndex((word) &string5, 0, (word) &string2); (* (ptr) (( (bPt) gf_c0374)+100) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0374)+24) ), (word) &string6); (* (ptr) (( (bPt) gf_c0374)+104) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0374)+20) ), (word) &string7); (* (ptr) (( (bPt) gf_c0374)+108) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c0374)+24) ), (word) &string8); (void) XR_DeclareGlobalFrame((word) "TEditMouseImpl", &globalframe, (word) XR_GetTypeIndex((word) &string9, 0, (word) &string10) , (word) (( (bPt) gf_c0374)+288)/* var_c33412 */ ); var_c37060 = (word) XR_ImportInterface((word) "CharOps", (word) XR_GetTypeIndexS((word) (&string11)), 14); (* (( (ptr) gf_c0374)+83)/* var_c35236 */ ) = var_c37060; var_c37060 = (word) XR_ImportInterface((word) "EditSpan", (word) XR_GetTypeIndexS((word) (&string12)), 23); (* (( (ptr) gf_c0374)+80)/* var_c34468 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 68422405); (void) XR_ImportProcS(var_c37060, 67637762); var_c37060 = (word) XR_ImportInterface((word) "NodeStyleOps", (word) XR_GetTypeIndexS((word) (&string13)), 23); (* (( (ptr) gf_c0374)+87)/* var_c36868 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 262913); (void) XR_ImportProcS(var_c37060, 789251); (void) XR_ImportProcS(var_c37060, 67109376); var_c37060 = (word) XR_ImportInterface((word) "Rope", (word) XR_GetTypeIndexS((word) (&string14)), 43); (* (( (ptr) gf_c0374)+85)/* var_c36452 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 67373825); var_c37060 = (word) XR_ImportInterface((word) "RopeReader", (word) XR_GetTypeIndexS((word) (&string15)), 25); (* (( (ptr) gf_c0374)+81)/* var_c35012 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 268033); (void) XR_ImportProcS(var_c37060, 67636482); (void) XR_ImportProcS(var_c37060, 67114496); var_c37060 = (word) XR_ImportInterface((word) "TEditInput", (word) XR_GetTypeIndexS((word) (&string16)), 44); (* (( (ptr) gf_c0374)+86)/* var_c36804 */ ) = var_c37060; var_c37060 = (word) XR_ImportInterface((word) "TEditProfile", (word) XR_GetTypeIndexS((word) (&string17)), 19); (* (( (ptr) gf_c0374)+84)/* var_c35396 */ ) = var_c37060; var_c37060 = (word) XR_ImportInterface((word) "TEditFormat", (word) XR_GetTypeIndexS((word) (&string18)), 17); (* (( (ptr) gf_c0374)+74)/* var_c33444 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 134743042); (void) XR_ImportProcS(var_c37060, 1573126); (void) XR_ImportProcS(var_c37060, 336069378); (void) XR_ImportProcS(var_c37060, 67110400); var_c37060 = (word) XR_ImportInterface((word) &string19, (word) XR_GetTypeIndexS((word) (&string20)), 68); (* (( (ptr) gf_c0374)+75)/* var_c33540 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 11264); (void) XR_ImportProcS(var_c37060, 526338); (void) XR_ImportProcS(var_c37060, 1058564); (void) XR_ImportProcS(var_c37060, 1316101); (void) XR_ImportProcS(var_c37060, 270337); (void) XR_ImportProcS(var_c37060, 266753); (void) XR_ImportProcS(var_c37060, 528642); (void) XR_ImportProcS(var_c37060, 263937); (void) XR_ImportProcS(var_c37060, 67110400); var_c37060 = (word) XR_ImportInterface((word) "TEditTouchup", (word) XR_GetTypeIndexS((word) (&string21)), 6); (* (( (ptr) gf_c0374)+77)/* var_c33668 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 263425); (void) XR_ImportProcS(var_c37060, 67633922); var_c37060 = (word) XR_ImportInterface((word) "TextEdit", (word) XR_GetTypeIndexS((word) (&string22)), 39); (* (( (ptr) gf_c0374)+78)/* var_c33828 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 67633154); (void) XR_ImportProcS(var_c37060, 67633410); (void) XR_ImportProcS(var_c37060, 67371521); var_c37060 = (word) XR_ImportInterface((word) "TextEditBogus", (word) XR_GetTypeIndexS((word) (&string23)), 1); (* (( (ptr) gf_c0374)+82)/* var_c35076 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 67371009); var_c37060 = (word) XR_ImportInterface((word) "TextNode", (word) XR_GetTypeIndexS((word) (&string24)), 34); (* (( (ptr) gf_c0374)+79)/* var_c34212 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 67372289); (void) XR_ImportProcS(var_c37060, 67372033); (void) XR_ImportProcS(var_c37060, 67377153); (void) XR_ImportProcS(var_c37060, 67379201); (void) XR_ImportProcS(var_c37060, 67376641); var_c37060 = (word) XR_ImportInterface((word) "ViewerGroupLocks", (word) XR_GetTypeIndexS((word) (&string25)), 2); (* (( (ptr) gf_c0374)+76)/* var_c33572 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 524290); var_c37060 = (word) XR_ImportInterface((word) "ViewerOps", (word) XR_GetTypeIndexS((word) (&string26)), 43); (* (( (ptr) gf_c0374)+88)/* var_c36900 */ ) = var_c37060; (void) XR_ImportProcS(var_c37060, 67639554); var_c37060 = (word) XR_ExportInterface((word) &string19, (word) XR_GetTypeIndexS((word) (&string20)), 68); (* (( (ptr) gf_c0374)+89)/* var_c37092 */ ) = var_c37060; (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+168)/* var_c32932 */ , 11520); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+160)/* var_c32900 */ , 536066); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+152)/* var_c32868 */ , 12032); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+272)/* var_c33348 */ , 1586182); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+264)/* var_c33316 */ , 1586438); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+256)/* var_c33284 */ , 1586694); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+248)/* var_c33252 */ , 1586950); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+240)/* var_c33220 */ , 1587206); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+200)/* var_c33060 */ , 1587462); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+216)/* var_c33124 */ , 2112008); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+144)/* var_c32836 */ , 134495233); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+136)/* var_c32804 */ , 67386625); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+208)/* var_c33092 */ , 279041); var_c37060 = (word) XR_ExportInterface((word) "TEditSelectionPrivate", (word) XR_GetTypeIndexS((word) (&string27)), 3); (* (( (ptr) gf_c0374)+89)/* var_c37092 */ ) = var_c37060; (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+128)/* var_c32772 */ , 0); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+112)/* var_c32708 */ , 135266563); (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+176)/* var_c32964 */ , 68420101); var_c37060 = (word) XR_ExportInterface((word) "TEditSelectionPrivateExtras", (word) XR_GetTypeIndexS((word) (&string28)), 2) ; (* (( (ptr) gf_c0374)+89)/* var_c37092 */ ) = var_c37060; (void) XR_ExportProcS(var_c37060, (word) (( (bPt) gf_c0374)+280)/* var_c33380 */ , 1572870); } static void TEditMouseImpl_P0(formal_c053, formal_c052) word formal_c053; word formal_c052; { register ptr gf_c37124 = (ptr) &globalframe; /* TEditMouseImpl: */ SOURCE(1310, 21999) /* moved to installation proc */ SOURCE(22221, 55) { word pd29; pd29 = (* (( (ptr) (* (( (ptr) gf_c37124)+74)/* var_c33444 */ ))+10) ); (* (( (ptr) gf_c37124)+16)/* lineInfo_v4260 */ ) = (word) ( *( (fPt) ((* (ptr) pd29 ))))(pd29); }; } static void DoSelect_P60(formal_c0439, formal_c0440, formal_c0441, formal_c0442, formal_c0443, formal_c0444) word formal_c0439; word formal_c0440; word formal_c0441; word formal_c0442; word formal_c0443; word formal_c0444; { W15 var_c37156; /* declaration of proc_v4424 skipped */ /* declaration of viewer_v4452 skipped */ /* declaration of tdd_v4480 skipped */ /* declaration of x_v4508 skipped */ /* declaration of y_v4536 skipped */ /* declaration of sel_v4564 skipped */ register ptr gf_c37188 = (ptr) &globalframe; /* declaration of var_c33476 skipped */ /* declaration of var_c33508 skipped */ (* (( (ptr) &var_c37156)+4)/* proc_v4424 */ ) = formal_c0439; (* (( (ptr) &var_c37156)+5)/* viewer_v4452 */ ) = formal_c0440; (* (( (ptr) &var_c37156)+6)/* tdd_v4480 */ ) = formal_c0441; (* (( (ptr) &var_c37156)+7)/* x_v4508 */ ) = formal_c0442; (* (( (ptr) &var_c37156)+8)/* y_v4536 */ ) = formal_c0443; (* (( (ptr) &var_c37156)+9)/* sel_v4564 */ ) = formal_c0444; /* DoSelect: */ SOURCE(1624, 646) { word tmpAddr30; tmpAddr30 = (word) (( (ptr) &var_c37156)+10)/* var_c33476 */ ; (* (ptr) tmpAddr30 ) = ( ((word) (fPt) inner_P1500) ); (* (( (ptr) tmpAddr30) + 1) ) = 1; }; { word tmpAddr31; tmpAddr31 = (word) (( (ptr) &var_c37156)+12)/* var_c33508 */ ; (* (ptr) tmpAddr31 ) = ( ((word) (fPt) action_P1440) ); (* (( (ptr) tmpAddr31) + 1) ) = 1; }; SOURCE(2229, 41) SOURCE(2717, 39) { word pd32; pd32 = (* (( (ptr) (* (( (ptr) gf_c37188)+75)/* var_c33540 */ ))+21) ); (void) ( *( (fPt) ((* (ptr) pd32 ))))((* (( (ptr) &var_c37156)+9)/* sel_v4564 */ ), (* (( (ptr) gf_c37188)+26) ), pd32) ; }; SOURCE(2758, 97) { /* declaration of var_c01 skipped */ (* (( (ptr) &var_c37156)+14)/* var_c01 */ ) = (* (( (ptr) (* (( (ptr) gf_c37188)+76)/* var_c33572 */ ))+4) ); { word var_c0411; var_c0411 = (word) &var_c37156; (void) (word) XR_Enable(( ((word) (fPt) NoName_Q4704) ), ( ((word) (fPt) NoName_Q4884) ), var_c0411); }; }; SOURCE(2857, 30) { word pd33; pd33 = (* (( (ptr) (* (( (ptr) gf_c37188)+75)/* var_c33540 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd33 ))))((* ((( (ptr) &var_c37156)+9)/* sel_v4564 */ ) ), pd33); }; } static word NoName_Q4704(formal_c0377) word formal_c0377; { SOURCE(2758, 97) { word pd34; pd34 = (* (( (ptr) formal_c0377)+14) ); (void) ( *( (fPt) ((* (ptr) pd34 ))))((word) (( (bPt) formal_c0377)+40), (* (( (ptr) formal_c0377)+5) ), pd34); }; return(0); } static void action_P1440(formal_c37252) word formal_c37252; { register ptr gf_c37220 = (ptr) &globalframe; word refSel_v8108; word tSel_v8136 = 0; word rightOfLine_v8164 = 0; formal_c37252 = (formal_c37252 - 48); /* action: */ SOURCE(1838, 388) SOURCE(1855, 166) { word var_c33604; var_c33604 = (* (( (ptr) formal_c37252)+9) ); switch (var_c33604) { case 0: refSel_v8108 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c37220)+75)/* var_c33540 */ ))+4) ) ); break; case 1: refSel_v8108 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c37220)+75)/* var_c33540 */ ))+5) ) ); break; case 2: refSel_v8108 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c37220)+75)/* var_c33540 */ ))+6) ) ); break; default: refSel_v8108 = ( XR_RaiseUnnamedError(), 0 ); break; }; }; SOURCE(2081, 29) { word pd35; pd35 = (* (( (ptr) (* (( (ptr) gf_c37220)+75)/* var_c33540 */ ))+10) ); tSel_v8136 = (word) ( *( (fPt) ((* (ptr) pd35 ))))(pd35); }; SOURCE(2112, 52) rightOfLine_v8164 = (word) ResolveToChar_P900(tSel_v8136, (* (( (ptr) formal_c37252)+5) ), (* (( (ptr) formal_c37252)+6) ), (* ( ( (ptr) formal_c37252)+7) ), (* (( (ptr) formal_c37252)+8) )); SOURCE(2166, 31) { word pd36; pd36 = (* (( (ptr) formal_c37252)+4) ); (void) ( *( (fPt) ((* (ptr) pd36 ))))(tSel_v8136, refSel_v8108, rightOfLine_v8164, pd36); }; SOURCE(2199, 27) { word pd37; pd37 = (* (( (ptr) (* (( (ptr) gf_c37220)+75)/* var_c33540 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd37 ))))(tSel_v8136, pd37); }; } static void inner_P1500(formal_c37348) word formal_c37348; { W4 var_c37284; register ptr gf_c37316 = (ptr) &globalframe; formal_c37348 = (formal_c37348 - 40); var_c37284.f0 = formal_c37348; /* inner: */ SOURCE(2438, 259) SOURCE(2454, 243) { word var_c33636; var_c33636 = (* (( (ptr) (* (( (ptr) formal_c37348)+5) ))+26) ); if ((var_c33636 == 0)) { goto lab_L100002; }; if (((* (( (ptr) gf_c37316)+22) ) == XR_GetReferentType(var_c33636))) { { word vtdd_v8252; vtdd_v8252 = var_c33636; SOURCE(2524, 173) if ((vtdd_v8252 == (* (( (ptr) formal_c37348)+6) ))) { SOURCE(2545, 152) { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf_c37316)+77)/* var_c33668 */ ))+7) ); if ((0 != (word) ( *( (fPt) ((* (ptr) pd38 ))))((* (( (ptr) formal_c37348)+6) ), (* (( (ptr) gf_c37316)+26) ), pd38))) { SOURCE(2602, 57) { word var_c0412; var_c0412 = (word) &var_c37284; (void) (word) XR_Enable(( ((word) (fPt) NoName_Q4764) ), ( ((word) (fPt) NoName_Q4824) ), var_c0412); }; SOURCE(2661, 36) { word pd39; pd39 = (* (( (ptr) (* (( (ptr) gf_c37316)+77)/* var_c33668 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd39 ))))((* ((( (ptr) formal_c37348)+6)) ), pd39); }; }; }; }; }; } else { lab_L100002: ; }; }; } static word NoName_Q4764(formal_c0382) word formal_c0382; { SOURCE(2602, 57) (void) action_P1440((word) ((( (bPt) (* (ptr) formal_c0382 ))+48))); return(0); } static void SelectPoint_P180(formal_c0445, formal_c0446, formal_c0447, y_v4984, formal_c0448, formal_c0449) word formal_c0445; word formal_c0446; word formal_c0447; word y_v4984; word formal_c0448; word formal_c0449; { W11 var_c37380; /* declaration of viewer_v4900 skipped */ /* declaration of tdd_v4928 skipped */ /* declaration of x_v4956 skipped */ /* declaration of sel_v5012 skipped */ /* declaration of pDel_v5040 skipped */ /* declaration of var_c33700 skipped */ (* (( (ptr) &var_c37380)+4)/* viewer_v4900 */ ) = formal_c0445; (* (( (ptr) &var_c37380)+5)/* tdd_v4928 */ ) = formal_c0446; (* (( (ptr) &var_c37380)+6)/* x_v4956 */ ) = formal_c0447; (* (( (ptr) &var_c37380)+7)/* sel_v5012 */ ) = formal_c0448; (* (( (ptr) &var_c37380)+8)/* pDel_v5040 */ ) = formal_c0449; /* SelectPoint: */ SOURCE(2893, 881) { word tmpAddr40; tmpAddr40 = (word) (( (ptr) &var_c37380)+9)/* var_c33700 */ ; (* (ptr) tmpAddr40 ) = ( ((word) (fPt) DoSelectPoint_P1608) ); (* (( (ptr) tmpAddr40) + 1) ) = 1; }; SOURCE(3727, 47) (void) DoSelect_P60((word) (( (bPt) &var_c37380)+36)/* var_c33700 */ , (* (( (ptr) &var_c37380)+4)/* viewer_v4900 */ ), (* ( ( (ptr) &var_c37380)+5)/* tdd_v4928 */ ), (* (( (ptr) &var_c37380)+6)/* x_v4956 */ ), y_v4984, (* (( (ptr) &var_c37380)+7) /* sel_v5012 */ )); } static void DoSelectPoint_P1608(tSel_v8372, refSel_v8400, rightOfLine_v8428, formal_c37444) word tSel_v8372; word refSel_v8400; word rightOfLine_v8428; word formal_c37444; { register ptr gf_c37412 = (ptr) &globalframe; word newInsertion_v8456 = 0; formal_c37444 = (formal_c37444 - 36); /* DoSelectPoint: */ SOURCE(3053, 666) SOURCE(3177, 96) if (((* (ptr) refSel_v8400 ) != (* (( (ptr) formal_c37444)+4) )) || ((* (( (ptr) refSel_v8400)+22) ) != 0)) { SOURCE(3234, 39) { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf_c37412)+75)/* var_c33540 */ ))+36) ); (void) ( *( (fPt) ((* (ptr) pd41 ))))((* ((( (ptr) formal_c37444)+7)) ), pd41); }; }; SOURCE(3275, 21) (* (W9Pt) (( (ptr) tSel_v8372)+11) ) = (* (W9Pt) (( (ptr) tSel_v8372)+2) ); SOURCE(3298, 71) newInsertion_v8456 = (word) SetInsertion_P840(tSel_v8372, (* (( (ptr) formal_c37444)+6) ), (* (( (ptr) tSel_v8372)+4) ), rightOfLine_v8428, (* ( ( (ptr) formal_c37444)+5) )); SOURCE(3371, 348) if ((((((* (ptr) refSel_v8400 ) != (* (( (ptr) formal_c37444)+4) )) || ! XR_EqualWords((( (ptr) refSel_v8400)+2), (( (ptr) tSel_v8372)+2) , 9)) || ((* (( (ptr) refSel_v8400)+22) ) != 0)) || ((* (( (ptr) refSel_v8400)+24) ) != newInsertion_v8456)) || ((* (( (ptr) refSel_v8400)+26) ) != (* (( (ptr) formal_c37444)+8) ))) { SOURCE(3519, 24) (* (( (ptr) tSel_v8372)+22) ) = 0; SOURCE(3545, 20) (* (ptr) tSel_v8372 ) = (* (( (ptr) formal_c37444)+4) ); SOURCE(3567, 15) (* (( (ptr) tSel_v8372)+1) ) = (* (( (ptr) formal_c37444)+5) ); SOURCE(3584, 29) (* (( (ptr) tSel_v8372)+24) ) = newInsertion_v8456; SOURCE(3615, 25) (* (( (ptr) tSel_v8372)+26) ) = (* (( (ptr) formal_c37444)+8) ); SOURCE(3642, 17) (void) SetSelLooks_P660(tSel_v8372); SOURCE(3661, 58) { word pd42; pd42 = (* (( (ptr) (* (( (ptr) gf_c37412)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd42 ))))(tSel_v8372, (* (( (ptr) formal_c37444)+7) ), 1, 1, 0, pd42); }; }; } static void SelectChar_P240(formal_c0450, formal_c0451, formal_c0452, y_v5184, formal_c0453, formal_c0454) word formal_c0450; word formal_c0451; word formal_c0452; word y_v5184; word formal_c0453; word formal_c0454; { W11 var_c37476; /* declaration of viewer_v5100 skipped */ /* declaration of tdd_v5128 skipped */ /* declaration of x_v5156 skipped */ /* declaration of sel_v5212 skipped */ /* declaration of pDel_v5240 skipped */ /* declaration of var_c33732 skipped */ (* (( (ptr) &var_c37476)+4)/* viewer_v5100 */ ) = formal_c0450; (* (( (ptr) &var_c37476)+5)/* tdd_v5128 */ ) = formal_c0451; (* (( (ptr) &var_c37476)+6)/* x_v5156 */ ) = formal_c0452; (* (( (ptr) &var_c37476)+7)/* sel_v5212 */ ) = formal_c0453; (* (( (ptr) &var_c37476)+8)/* pDel_v5240 */ ) = formal_c0454; /* SelectChar: */ SOURCE(3780, 1239) { word tmpAddr43; tmpAddr43 = (word) (( (ptr) &var_c37476)+9)/* var_c33732 */ ; (* (ptr) tmpAddr43 ) = ( ((word) (fPt) DoSelectChar_P1668) ); (* (( (ptr) tmpAddr43) + 1) ) = 1; }; SOURCE(4973, 46) (void) DoSelect_P60((word) (( (bPt) &var_c37476)+36)/* var_c33732 */ , (* (( (ptr) &var_c37476)+4)/* viewer_v5100 */ ), (* ( ( (ptr) &var_c37476)+5)/* tdd_v5128 */ ), (* (( (ptr) &var_c37476)+6)/* x_v5156 */ ), y_v5184, (* (( (ptr) &var_c37476)+7) /* sel_v5212 */ )); } static void DoSelectChar_P1668(tSel_v8576, refSel_v8604, rightOfLine_v8632, formal_c37540) word tSel_v8576; word refSel_v8604; word rightOfLine_v8632; word formal_c37540; { register ptr gf_c37508 = (ptr) &globalframe; word newInsertion_v8660 = 0; word newGrain_v8688 = 1; word startValid_v8716 = 1; word endValid_v8744 = 1; word var_c0413; word var_c33764; formal_c37540 = (formal_c37540 - 36); /* DoSelectChar: */ SOURCE(3940, 1025) SOURCE(4141, 21) (* (W9Pt) (( (ptr) tSel_v8576)+11) ) = (* (W9Pt) (( (ptr) tSel_v8576)+2) ); SOURCE(4164, 409) { word tc44; if ( ( ( (0 != rightOfLine_v8632) ? ((* (( (ptr) (* (( (ptr) formal_c37540)+5) ))+11) ) != 0) : 0 ) ? ( (int)(* (( (ptr) tSel_v8576)+13) ) == (int)(* (ptr) (* (( (ptr) (* (( (ptr) formal_c37540)+5) ))+1) ) )) : 0 ) ) { { word idx45; word limit46; var_c33764 = (* (( (ptr) (* (( (ptr) formal_c37540)+5) ))+1) ); var_c0413 = (var_c0413 & 2147483648) | (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var_c33764)+3))+( idx45 = (* (( (ptr) tSel_v8576)+13) ), limit46 = (* (( (ptr) var_c33764)+2) ), BCK(idx45, limit46) )))+2) ) << 1) >> 1) )); }; tc44 = (word) (( (((unsigned)var_c0413 << 1) >> 1) ) == 0); } else { tc44 = (word) 0; }; if (tc44) { SOURCE(4324, 78) { word var_c33796; { word pd47; pd47 = (* (( (ptr) (* (( (ptr) gf_c37508)+78)/* var_c33828 */ ))+6) ); var_c33796 = (word) ( *( (fPt) ((* (ptr) pd47 ))))((* ((( (ptr) tSel_v8576)+2)) ), pd47); }; (* (( (ptr) tSel_v8576)+3) ) = var_c33796; (* (( (ptr) tSel_v8576)+12) ) = var_c33796; }; SOURCE(4404, 16) newGrain_v8688 = 0; SOURCE(4422, 21) newInsertion_v8660 = 0; SOURCE(4445, 29) endValid_v8744 = 0; startValid_v8716 = 0; } else { SOURCE(4485, 71) newInsertion_v8660 = (word) SetInsertion_P840(tSel_v8576, (* (( (ptr) formal_c37540)+6) ), (* (( (ptr) tSel_v8576)+4) ), rightOfLine_v8632, (* ( ( (ptr) formal_c37540)+5) )); SOURCE(4558, 15) newGrain_v8688 = 1; }; }; SOURCE(4578, 387) if (((((((* (ptr) refSel_v8604 ) != (* (( (ptr) formal_c37540)+4) )) || ! XR_EqualWords((( (ptr) refSel_v8604)+2), (( (ptr) tSel_v8576)+2) , 9)) || ! XR_EqualWords((( (ptr) refSel_v8604)+11), (( (ptr) tSel_v8576)+11), 9)) || ((* (( (ptr) refSel_v8604)+22) ) != newGrain_v8688)) || ((* ( ( (ptr) refSel_v8604)+26) ) != (* (( (ptr) formal_c37540)+8) ))) || ((* (( (ptr) refSel_v8604)+24) ) != newInsertion_v8660)) { SOURCE(4752, 27) (* (( (ptr) tSel_v8576)+22) ) = newGrain_v8688; SOURCE(4781, 20) (* (ptr) tSel_v8576 ) = (* (( (ptr) formal_c37540)+4) ); SOURCE(4803, 15) (* (( (ptr) tSel_v8576)+1) ) = (* (( (ptr) formal_c37540)+5) ); SOURCE(4820, 29) (* (( (ptr) tSel_v8576)+24) ) = newInsertion_v8660; SOURCE(4851, 25) (* (( (ptr) tSel_v8576)+26) ) = (* (( (ptr) formal_c37540)+8) ); SOURCE(4878, 17) (void) SetSelLooks_P660(tSel_v8576); SOURCE(4897, 68) { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf_c37508)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd48 ))))(tSel_v8576, (* (( (ptr) formal_c37540)+7) ), startValid_v8716, endValid_v8744, 0, pd48) ; }; }; } static void SelectWord_P300(formal_c0455, formal_c0456, formal_c0457, y_v5384, formal_c0458, formal_c0459) word formal_c0455; word formal_c0456; word formal_c0457; word y_v5384; word formal_c0458; word formal_c0459; { W11 var_c37572; /* declaration of viewer_v5300 skipped */ /* declaration of tdd_v5328 skipped */ /* declaration of x_v5356 skipped */ /* declaration of sel_v5412 skipped */ /* declaration of pDel_v5440 skipped */ /* declaration of var_c33860 skipped */ (* (( (ptr) &var_c37572)+4)/* viewer_v5300 */ ) = formal_c0455; (* (( (ptr) &var_c37572)+5)/* tdd_v5328 */ ) = formal_c0456; (* (( (ptr) &var_c37572)+6)/* x_v5356 */ ) = formal_c0457; (* (( (ptr) &var_c37572)+7)/* sel_v5412 */ ) = formal_c0458; (* (( (ptr) &var_c37572)+8)/* pDel_v5440 */ ) = formal_c0459; /* SelectWord: */ SOURCE(5025, 1488) { word tmpAddr49; tmpAddr49 = (word) (( (ptr) &var_c37572)+9)/* var_c33860 */ ; (* (ptr) tmpAddr49 ) = ( ((word) (fPt) DoSelectWord_P1728) ); (* (( (ptr) tmpAddr49) + 1) ) = 1; }; SOURCE(6467, 46) (void) DoSelect_P60((word) (( (bPt) &var_c37572)+36)/* var_c33860 */ , (* (( (ptr) &var_c37572)+4)/* viewer_v5300 */ ), (* ( ( (ptr) &var_c37572)+5)/* tdd_v5328 */ ), (* (( (ptr) &var_c37572)+6)/* x_v5356 */ ), y_v5384, (* (( (ptr) &var_c37572)+7) /* sel_v5412 */ )); } static void DoSelectWord_P1728(tSel_v8864, refSel_v8892, rightOfLine_v8920, formal_c37636) word tSel_v8864; word refSel_v8892; word rightOfLine_v8920; word formal_c37636; { register ptr gf_c37604 = (ptr) &globalframe; word start_v8948; word end_v8976; word punc_v9004 = 0; word newInsertion_v9032 = 0; word newGrain_v9060 = 1; word startValid_v9088 = 1; word endValid_v9116 = 1; word hitLine_v9144; word var_c0414; word var_c33956; formal_c37636 = (formal_c37636 - 36); /* DoSelectWord: */ SOURCE(5185, 1274) SOURCE(5444, 34) hitLine_v9144 = (* (( (ptr) tSel_v8864)+4) ); SOURCE(5480, 49) { W3 var_c33892; (void) ExpandToWord_P780((word) &var_c33892, (* (W2Pt) (( (ptr) tSel_v8864)+2) ), 0); punc_v9004 = var_c33892.f2; end_v8976 = var_c33892.f1; start_v8948 = var_c33892.f0; }; SOURCE(5531, 20) (* (ptr) tSel_v8864 ) = (* (( (ptr) formal_c37636)+4) ); SOURCE(5553, 15) (* (( (ptr) tSel_v8864)+1) ) = (* (( (ptr) formal_c37636)+5) ); SOURCE(5570, 28) (* (( (ptr) tSel_v8864)+3) ) = start_v8948; SOURCE(5600, 41) (* (( (ptr) tSel_v8864)+11) ) = (* (( (ptr) tSel_v8864)+2) ); (* (( (ptr) tSel_v8864)+12) ) = end_v8976; SOURCE(5643, 43) { word pd50; pd50 = (* (( (ptr) (* (( (ptr) gf_c37604)+75)/* var_c33540 */ ))+43) ); (void) ( *( (fPt) ((* (ptr) pd50 ))))(tSel_v8864, (* (( (ptr) formal_c37636)+4) ), 1, 1, pd50); }; SOURCE(5688, 372) { word tc51; if ( ( ( (0 != rightOfLine_v8920) ? ((* (( (ptr) (* (( (ptr) formal_c37636)+5) ))+11) ) != 0) : 0 ) ? ( (int)(* (( (ptr) tSel_v8864)+13) ) == (int)(* (ptr) (* (( (ptr) (* (( (ptr) formal_c37636)+5) ))+1) ) )) : 0 ) ) { { word idx52; word limit53; var_c33956 = (* (( (ptr) (* (( (ptr) formal_c37636)+5) ))+1) ); var_c0414 = (var_c0414 & 2147483648) | (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var_c33956)+3))+( idx52 = (* (( (ptr) tSel_v8864)+13) ), limit53 = (* (( (ptr) var_c33956)+2) ), BCK(idx52, limit53) )))+2) ) << 1) >> 1) )); }; tc51 = (word) (( (((unsigned)var_c0414 << 1) >> 1) ) == 0); } else { tc51 = (word) 0; }; if (tc51) { SOURCE(5819, 78) { word var_c33988; { word pd54; pd54 = (* (( (ptr) (* (( (ptr) gf_c37604)+78)/* var_c33828 */ ))+6) ); var_c33988 = (word) ( *( (fPt) ((* (ptr) pd54 ))))((* ((( (ptr) tSel_v8864)+2)) ), pd54); }; (* (( (ptr) tSel_v8864)+3) ) = var_c33988; (* (( (ptr) tSel_v8864)+12) ) = var_c33988; }; SOURCE(5899, 16) newGrain_v9060 = 0; SOURCE(5917, 21) newInsertion_v9032 = 0; SOURCE(5940, 29) endValid_v9116 = 0; startValid_v9088 = 0; } else { SOURCE(5980, 63) newInsertion_v9032 = (word) SetInsertion_P840(tSel_v8864, (* (( (ptr) formal_c37636)+6) ), hitLine_v9144, rightOfLine_v8920, (* ( ( (ptr) formal_c37636)+5) )); SOURCE(6045, 15) newGrain_v9060 = 2; }; }; SOURCE(6065, 394) if (((((((* (ptr) refSel_v8892 ) != (* (ptr) tSel_v8864 )) || ((* (( (ptr) refSel_v8892)+22) ) != newGrain_v9060)) || ! XR_EqualWords( (( (ptr) tSel_v8864)+2), (( (ptr) refSel_v8892)+2), 2)) || ! XR_EqualWords((( (ptr) tSel_v8864)+11), (( (ptr) refSel_v8892)+11) , 2)) || (newInsertion_v9032 != (* (( (ptr) refSel_v8892)+24) ))) || ((* (( (ptr) refSel_v8892)+26) ) != (* (( (ptr) formal_c37636)+8) ))) { SOURCE(6260, 27) (* (( (ptr) tSel_v8864)+22) ) = newGrain_v9060; SOURCE(6289, 23) (* (( (ptr) tSel_v8864)+23) ) = punc_v9004; SOURCE(6314, 29) (* (( (ptr) tSel_v8864)+24) ) = newInsertion_v9032; SOURCE(6345, 25) (* (( (ptr) tSel_v8864)+26) ) = (* (( (ptr) formal_c37636)+8) ); SOURCE(6372, 17) (void) SetSelLooks_P660(tSel_v8864); SOURCE(6391, 68) { word pd55; pd55 = (* (( (ptr) (* (( (ptr) gf_c37604)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd55 ))))(tSel_v8864, (* (( (ptr) formal_c37636)+7) ), startValid_v9088, endValid_v9116, 0, pd55) ; }; }; } static void SelectNode_P360(formal_c0460, formal_c0461, formal_c0462, y_v5584, formal_c0463, formal_c0464) word formal_c0460; word formal_c0461; word formal_c0462; word y_v5584; word formal_c0463; word formal_c0464; { W11 var_c37668; /* declaration of viewer_v5500 skipped */ /* declaration of tdd_v5528 skipped */ /* declaration of x_v5556 skipped */ /* declaration of sel_v5612 skipped */ /* declaration of pDel_v5640 skipped */ /* declaration of var_c34020 skipped */ (* (( (ptr) &var_c37668)+4)/* viewer_v5500 */ ) = formal_c0460; (* (( (ptr) &var_c37668)+5)/* tdd_v5528 */ ) = formal_c0461; (* (( (ptr) &var_c37668)+6)/* x_v5556 */ ) = formal_c0462; (* (( (ptr) &var_c37668)+7)/* sel_v5612 */ ) = formal_c0463; (* (( (ptr) &var_c37668)+8)/* pDel_v5640 */ ) = formal_c0464; /* SelectNode: */ SOURCE(6519, 981) { word tmpAddr56; tmpAddr56 = (word) (( (ptr) &var_c37668)+9)/* var_c34020 */ ; (* (ptr) tmpAddr56 ) = ( ((word) (fPt) DoSelectNode_P1788) ); (* (( (ptr) tmpAddr56) + 1) ) = 1; }; SOURCE(7454, 46) (void) DoSelect_P60((word) (( (bPt) &var_c37668)+36)/* var_c34020 */ , (* (( (ptr) &var_c37668)+4)/* viewer_v5500 */ ), (* ( ( (ptr) &var_c37668)+5)/* tdd_v5528 */ ), (* (( (ptr) &var_c37668)+6)/* x_v5556 */ ), y_v5584, (* (( (ptr) &var_c37668)+7) /* sel_v5612 */ )); } static void DoSelectNode_P1788(tSel_v9264, refSel_v9292, rightOfLine_v9320, formal_c37732) word tSel_v9264; word refSel_v9292; word rightOfLine_v9320; word formal_c37732; { register ptr gf_c37700 = (ptr) &globalframe; word hitLine_v9348; word newInsertion_v9376 = 0; formal_c37732 = (formal_c37732 - 36); /* DoSelectNode: */ SOURCE(6678, 768) SOURCE(6760, 34) hitLine_v9348 = (* (( (ptr) tSel_v9264)+4) ); SOURCE(6837, 20) (* (ptr) tSel_v9264 ) = (* (( (ptr) formal_c37732)+4) ); SOURCE(6859, 15) (* (( (ptr) tSel_v9264)+1) ) = (* (( (ptr) formal_c37732)+5) ); SOURCE(6876, 41) { word var_c34052; var_c34052 = (* (( (ptr) tSel_v9264)+2) ); (* (( (ptr) tSel_v9264)+2) ) = var_c34052; (* (( (ptr) tSel_v9264)+3) ) = 0; }; SOURCE(6919, 81) { word var_c34084; { word pd57; word x58; pd57 = (* (( (ptr) (* (( (ptr) gf_c37700)+78)/* var_c33828 */ ))+6) ); var_c34084 = ((x58 = (word) ( *( (fPt) ((* (ptr) pd57 ))))((* ((( (ptr) tSel_v9264)+2)) ), pd57), MAX((int)(word), x58, 1)) - 1); }; (* (( (ptr) tSel_v9264)+11) ) = (* (( (ptr) tSel_v9264)+2) ); (* (( (ptr) tSel_v9264)+12) ) = var_c34084; }; SOURCE(7002, 43) { word pd59; pd59 = (* (( (ptr) (* (( (ptr) gf_c37700)+75)/* var_c33540 */ ))+43) ); (void) ( *( (fPt) ((* (ptr) pd59 ))))(tSel_v9264, (* (( (ptr) formal_c37732)+4) ), 1, 1, pd59); }; SOURCE(7047, 57) newInsertion_v9376 = (word) SetInsertion_P840(tSel_v9264, (* (( (ptr) formal_c37732)+6) ), hitLine_v9348, 0, (* (( (ptr) formal_c37732)+5) )); SOURCE(7106, 340) if ((((((* (ptr) refSel_v9292 ) != (* (( (ptr) formal_c37732)+4) )) || ((* (( (ptr) refSel_v9292)+2) ) != (* (( (ptr) tSel_v9264)+2) ))) || ((* (( (ptr) refSel_v9292)+22) ) != 3)) || ((* (( (ptr) refSel_v9292)+26) ) != (* (( (ptr) formal_c37732)+8) ))) || ((* ( ( (ptr) refSel_v9292)+24) ) != newInsertion_v9376)) { SOURCE(7271, 23) (* (( (ptr) tSel_v9264)+22) ) = 3; SOURCE(7296, 25) (* (( (ptr) tSel_v9264)+26) ) = (* (( (ptr) formal_c37732)+8) ); SOURCE(7323, 29) (* (( (ptr) tSel_v9264)+24) ) = newInsertion_v9376; SOURCE(7354, 17) (void) SetSelLooks_P660(tSel_v9264); SOURCE(7373, 73) { word pd60; pd60 = (* (( (ptr) (* (( (ptr) gf_c37700)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd60 ))))(tSel_v9264, (* (( (ptr) formal_c37732)+7) ), 0, 0, 0, pd60); }; }; } static void SelectBranch_P420(formal_c0465, formal_c0466, formal_c0467, y_v5784, formal_c0468, formal_c0469) word formal_c0465; word formal_c0466; word formal_c0467; word y_v5784; word formal_c0468; word formal_c0469; { W11 var_c37764; /* declaration of viewer_v5700 skipped */ /* declaration of tdd_v5728 skipped */ /* declaration of x_v5756 skipped */ /* declaration of sel_v5812 skipped */ /* declaration of pDel_v5840 skipped */ /* declaration of var_c34148 skipped */ (* (( (ptr) &var_c37764)+4)/* viewer_v5700 */ ) = formal_c0465; (* (( (ptr) &var_c37764)+5)/* tdd_v5728 */ ) = formal_c0466; (* (( (ptr) &var_c37764)+6)/* x_v5756 */ ) = formal_c0467; (* (( (ptr) &var_c37764)+7)/* sel_v5812 */ ) = formal_c0468; (* (( (ptr) &var_c37764)+8)/* pDel_v5840 */ ) = formal_c0469; /* SelectBranch: */ SOURCE(7506, 1027) { word tmpAddr61; tmpAddr61 = (word) (( (ptr) &var_c37764)+9)/* var_c34148 */ ; (* (ptr) tmpAddr61 ) = ( ((word) (fPt) DoSelectBranch_P1848) ); (* (( (ptr) tmpAddr61) + 1) ) = 1; }; SOURCE(8485, 48) (void) DoSelect_P60((word) (( (bPt) &var_c37764)+36)/* var_c34148 */ , (* (( (ptr) &var_c37764)+4)/* viewer_v5700 */ ), (* ( ( (ptr) &var_c37764)+5)/* tdd_v5728 */ ), (* (( (ptr) &var_c37764)+6)/* x_v5756 */ ), y_v5784, (* (( (ptr) &var_c37764)+7) /* sel_v5812 */ )); } static void DoSelectBranch_P1848(tSel_v9496, refSel_v9524, rightOfLine_v9552, formal_c37828) word tSel_v9496; word refSel_v9524; word rightOfLine_v9552; word formal_c37828; { register ptr gf_c37796 = (ptr) &globalframe; word hitLine_v9580; word newInsertion_v9608 = 0; formal_c37828 = (formal_c37828 - 36); /* DoSelectBranch: */ SOURCE(7667, 810) SOURCE(7751, 34) hitLine_v9580 = (* (( (ptr) tSel_v9496)+4) ); SOURCE(7828, 20) (* (ptr) tSel_v9496 ) = (* (( (ptr) formal_c37828)+4) ); SOURCE(7850, 15) (* (( (ptr) tSel_v9496)+1) ) = (* (( (ptr) formal_c37828)+5) ); SOURCE(7867, 41) { word var_c34180; var_c34180 = (* (( (ptr) tSel_v9496)+2) ); (* (( (ptr) tSel_v9496)+2) ) = var_c34180; (* (( (ptr) tSel_v9496)+3) ) = 0; }; SOURCE(7910, 60) { word pd62; pd62 = (* (( (ptr) (* (( (ptr) gf_c37796)+79)/* var_c34212 */ ))+26) ); (* (( (ptr) tSel_v9496)+11) ) = (word) ( *( (fPt) ((* (ptr) pd62 ))))((* ((( (ptr) tSel_v9496)+2)) ), pd62); }; SOURCE(7972, 55) { word pd63; pd63 = (* (( (ptr) (* (( (ptr) gf_c37796)+79)/* var_c34212 */ ))+36) ); (* (( (ptr) tSel_v9496)+12) ) = (word) ( *( (fPt) ((* (ptr) pd63 ))))((* ((( (ptr) tSel_v9496)+11)) ), pd63); }; SOURCE(8029, 43) { word pd64; pd64 = (* (( (ptr) (* (( (ptr) gf_c37796)+75)/* var_c33540 */ ))+43) ); (void) ( *( (fPt) ((* (ptr) pd64 ))))(tSel_v9496, (* (( (ptr) formal_c37828)+4) ), 1, 1, pd64); }; SOURCE(8074, 57) newInsertion_v9608 = (word) SetInsertion_P840(tSel_v9496, (* (( (ptr) formal_c37828)+6) ), hitLine_v9580, 0, (* (( (ptr) formal_c37828)+5) )); SOURCE(8133, 344) if ((((((* (ptr) refSel_v9524 ) != (* (( (ptr) formal_c37828)+4) )) || ((* (( (ptr) refSel_v9524)+2) ) != (* (( (ptr) tSel_v9496)+2) ))) || ((* (( (ptr) refSel_v9524)+22) ) != 4)) || ((* (( (ptr) refSel_v9524)+26) ) != (* (( (ptr) formal_c37828)+8) ))) || ((* ( ( (ptr) refSel_v9524)+24) ) != newInsertion_v9608)) { SOURCE(8300, 25) (* (( (ptr) tSel_v9496)+22) ) = 4; SOURCE(8327, 25) (* (( (ptr) tSel_v9496)+26) ) = (* (( (ptr) formal_c37828)+8) ); SOURCE(8354, 29) (* (( (ptr) tSel_v9496)+24) ) = newInsertion_v9608; SOURCE(8385, 17) (void) SetSelLooks_P660(tSel_v9496); SOURCE(8404, 73) { word pd65; pd65 = (* (( (ptr) (* (( (ptr) gf_c37796)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd65 ))))(tSel_v9496, (* (( (ptr) formal_c37828)+7) ), 0, 0, 0, pd65); }; }; } static word Dist_P480(sel_v5900, dir_v5928, x_v5956, y_v5984) word sel_v5900; word dir_v5928; word x_v5956; word y_v5984; { word var_c6028; /* Dist: */ SOURCE(8539, 294) SOURCE(8730, 103) if ((dir_v5928 == 0)) { { word var_c0415; { word var_c34276; word n_v31504; word var_c34308; word n_v31456; n_v31504 = (x_v5956 - (* (( (ptr) sel_v5900)+5) )); SOURCE(8716, 11) var_c34276 = IOP2( * , (int)n_v31504, (int)n_v31504); n_v31456 = (y_v5984 - (* (( (ptr) sel_v5900)+6) )); SOURCE(8716, 11) var_c34308 = IOP2( * , (int)n_v31456, (int)n_v31456); var_c0415 = (var_c34276 + var_c34308); }; return(var_c0415); }; } else { { word var_c0416; { word var_c34340; word n_v31408; word var_c34372; word n_v31360; n_v31408 = (x_v5956 - (* (( (ptr) sel_v5900)+14) )); SOURCE(8716, 11) var_c34340 = IOP2( * , (int)n_v31408, (int)n_v31408); n_v31360 = (y_v5984 - (* (( (ptr) sel_v5900)+15) )); SOURCE(8716, 11) var_c34372 = IOP2( * , (int)n_v31360, (int)n_v31360); var_c0416 = (var_c34340 + var_c34372); }; return(var_c0416); }; }; } static word CompareLoc_P540(loc1_v6088, loc2_v6116) W2 loc1_v6088; W2 loc2_v6116; { register ptr gf_c37860 = (ptr) &globalframe; word order_v6160; /* CompareLoc: */ SOURCE(8839, 270) SOURCE(8928, 122) if ((loc1_v6088.f0 == loc2_v6116.f0)) { SOURCE(8956, 94) { word var_c34404; var_c34404 = loc1_v6088.f1; if (( (int)var_c34404 < (int)loc2_v6116.f1)) { return(0); } else { if (( (int)var_c34404 == (int)loc2_v6116.f1)) { return(1); } else { return(2); }; }; }; }; SOURCE(9052, 57) { word pd66; pd66 = (* (( (ptr) (* (( (ptr) gf_c37860)+80)/* var_c34468 */ ))+22) ); return((word) ( *( (fPt) ((* (ptr) pd66 ))))(loc1_v6088.f0, loc2_v6116.f0, pd66)); }; } static void Extend_P600(formal_c0470, formal_c0471, x_v6276, y_v6304, formal_c0472, formal_c0473, formal_c0474, formal_c0475) word formal_c0470; word formal_c0471; word x_v6276; word y_v6304; word formal_c0472; word formal_c0473; word formal_c0474; word formal_c0475; { W12 var_c37892; /* declaration of viewer_v6220 skipped */ /* declaration of tdd_v6248 skipped */ /* declaration of sel_v6332 skipped */ /* declaration of pDel_v6360 skipped */ /* declaration of changeLevel_v6388 skipped */ /* declaration of saveEnds_v6416 skipped */ /* declaration of var_c34500 skipped */ (* (( (ptr) &var_c37892)+4)/* viewer_v6220 */ ) = formal_c0470; (* (( (ptr) &var_c37892)+5)/* tdd_v6248 */ ) = formal_c0471; (* (( (ptr) &var_c37892)+6)/* sel_v6332 */ ) = formal_c0472; (* (( (ptr) &var_c37892)+7)/* pDel_v6360 */ ) = formal_c0473; (* (( (ptr) &var_c37892)+8)/* changeLevel_v6388 */ ) = formal_c0474; (* (( (ptr) &var_c37892)+9)/* saveEnds_v6416 */ ) = formal_c0475; /* Extend: */ SOURCE(9213, 3884) { word tmpAddr67; tmpAddr67 = (word) (( (ptr) &var_c37892)+10)/* var_c34500 */ ; (* (ptr) tmpAddr67 ) = ( ((word) (fPt) DoExtend_P1968) ); (* (( (ptr) tmpAddr67) + 1) ) = 1; }; SOURCE(13055, 42) (void) DoSelect_P60((word) (( (bPt) &var_c37892)+40)/* var_c34500 */ , (* (( (ptr) &var_c37892)+4)/* viewer_v6220 */ ), (* ( ( (ptr) &var_c37892)+5)/* tdd_v6248 */ ), x_v6276, y_v6304, (* (( (ptr) &var_c37892)+6)/* sel_v6332 */ )); } static void DoExtend_P1968(tSel_v9876, refSel_v9904, rightOfLine_v9932, formal_c37956) word tSel_v9876; word refSel_v9904; word rightOfLine_v9932; word formal_c37956; { register ptr gf_c37924 = (ptr) &globalframe; word end_v9960 = 0; word ok_v9988; W9 sp_v10016; formal_c37956 = (formal_c37956 - 40); /* DoExtend: */ SOURCE(9429, 3623) SOURCE(9552, 32) XR_FillWords(&sp_v10016, 9, 0); SOURCE(9618, 32) if (((* (ptr) refSel_v9904 ) == 0)) { SOURCE(9644, 6) return; }; SOURCE(9678, 30) ok_v9988 = ((* (( (ptr) refSel_v9904)+26) ) == (* (( (ptr) formal_c37956)+7) )); SOURCE(9710, 22) end_v9960 = (* (( (ptr) refSel_v9904)+24) ); SOURCE(9734, 233) if (((* (ptr) refSel_v9904 ) != (* (( (ptr) formal_c37956)+4) ))) { SOURCE(9763, 204) { word refTDD_v10060; SOURCE(9765, 68) refTDD_v10060 = XR_Narrow((* (( (ptr) (* (ptr) refSel_v9904 ))+26) ), (* (( (ptr) gf_c37924)+22) )); SOURCE(9835, 51) if ((refTDD_v10060 == 0) || ((* (ptr) refTDD_v10060 ) != (* (ptr) (* (( (ptr) formal_c37956)+5) ) ))) { SOURCE(9880, 6) return; }; SOURCE(9888, 79) ok_v9988 = 0; }; }; SOURCE(9970, 43) if (((* (( (ptr) refSel_v9904)+22) ) == 0)) { SOURCE(10003, 10) ok_v9988 = 0; }; SOURCE(10015, 105) if ((0 != (* (( (ptr) formal_c37956)+9) )) || ((* (( (ptr) formal_c37956)+5) ) != (* (( (ptr) gf_c37924)+12)/* initTDD_v3840 */ ))) { SOURCE(10049, 13) (* (( (ptr) gf_c37924)+12)/* initTDD_v3840 */ ) = (* (( (ptr) formal_c37956)+5) ); SOURCE(10064, 28) (* (W2Pt) (( (ptr) gf_c37924)+8)/* initStart_v3784 */ ) = (* (W2Pt) (( (ptr) refSel_v9904)+2) ); SOURCE(10094, 26) (* (W2Pt) (( (ptr) gf_c37924)+10)/* initEnd_v3812 */ ) = (* (W2Pt) (( (ptr) refSel_v9904)+11) ); }; SOURCE(10123, 15) sp_v10016 = (* (W9Pt) (( (ptr) tSel_v9876)+2) ); SOURCE(10140, 505) if ((end_v9960 == 1)) { SOURCE(10160, 235) if (((word) CompareLoc_P540((* (W2Pt) (( (ptr) tSel_v9876)+2) ), (* (W2Pt) (( (ptr) refSel_v9904)+2) )) == 0)) { SOURCE(10221, 12) end_v9960 = 0; SOURCE(10235, 126) { word var_c34564; var_c34564 = (word) CompareLoc_P540((* (W2Pt) (( (ptr) refSel_v9904)+2) ), (* (W2Pt) (( (ptr) gf_c37924)+10)/* initEnd_v3812 */ )) ; if ((var_c34564 == 1) || (var_c34564 == 0)) { SOURCE(10300, 24) (* (W2Pt) (( (ptr) refSel_v9904)+11) ) = (* (W2Pt) (( (ptr) gf_c37924)+10)/* initEnd_v3812 */ ); } else { SOURCE(10337, 24) (* (W2Pt) (( (ptr) gf_c37924)+10)/* initEnd_v3812 */ ) = (* (W2Pt) (( (ptr) refSel_v9904)+11) ); }; }; SOURCE(10383, 12) ok_v9988 = 0; }; } else { SOURCE(10406, 239) if (((word) CompareLoc_P540((* (W2Pt) (( (ptr) tSel_v9876)+2) ), (* (W2Pt) (( (ptr) refSel_v9904)+11) )) == 2)) { SOURCE(10464, 11) end_v9960 = 1; SOURCE(10477, 134) { word var_c34596; var_c34596 = (word) CompareLoc_P540((* (W2Pt) (( (ptr) gf_c37924)+8)/* initStart_v3784 */ ), (* (W2Pt) (( (ptr) refSel_v9904)+11) )); if ((var_c34596 == 1) || (var_c34596 == 0)) { SOURCE(10542, 28) (* (W2Pt) (( (ptr) refSel_v9904)+2) ) = (* (W2Pt) (( (ptr) gf_c37924)+8)/* initStart_v3784 */ ); } else { SOURCE(10583, 28) (* (W2Pt) (( (ptr) gf_c37924)+8)/* initStart_v3784 */ ) = (* (W2Pt) (( (ptr) refSel_v9904)+2) ); }; }; SOURCE(10633, 12) ok_v9988 = 0; }; }; SOURCE(10650, 126) if ( ( ( (0 != ok_v9988) ? ((* (( (ptr) formal_c37956)+8) ) == 2) : 0 ) ? ( ( (end_v9960 == 0) ? XR_EqualWords(&sp_v10016, ( ( (ptr) refSel_v9904)+2), 2) : 0 ) ? 1 : ( (end_v9960 == 1) ? XR_EqualWords(&sp_v10016, (( (ptr) refSel_v9904)+11), 2) : 0 ) ) : 0 ) ) { SOURCE(10770, 6) return; }; SOURCE(10791, 47) { word pd68; pd68 = (* (( (ptr) (* (( (ptr) gf_c37924)+75)/* var_c33540 */ ))+12) ); (void) ( *( (fPt) ((* (ptr) pd68 ))))(refSel_v9904, tSel_v9876, pd68); }; SOURCE(10840, 20) (* (ptr) tSel_v9876 ) = (* (( (ptr) formal_c37956)+4) ); SOURCE(10910, 242) if ( ( ( ( ((* (( (ptr) tSel_v9876)+22) ) == 0) ? (end_v9960 == 0) : 0 ) ? ( (int)(* (( (ptr) tSel_v9876)+12) ) > (int)0) : 0 ) ? ( ((* (ptr) &sp_v10016 ) != (* ( ( (ptr) tSel_v9876)+11) )) ? 1 : ( (int)(* (( (ptr) &sp_v10016)+1) ) < (int)(* (( (ptr) tSel_v9876)+12) )) ) : 0 ) ) { SOURCE(11060, 41) (* (( (ptr) tSel_v9876)+12) ) = ((* (( (ptr) tSel_v9876)+12) ) - 1); SOURCE(11140, 12) ok_v9988 = 0; }; SOURCE(11155, 308) { word var_c34628; var_c34628 = (* (( (ptr) formal_c37956)+8) ); switch (var_c34628) { case 2: break; case 0: SOURCE(11205, 10) ok_v9988 = 0; SOURCE(11217, 109) { word var_c34660; var_c34660 = (* (( (ptr) tSel_v9876)+22) ); switch (var_c34660) { case 4: (* (( (ptr) tSel_v9876)+22) ) = 3; break; case 3: (* (( (ptr) tSel_v9876)+22) ) = 2; break; case 2: (* (( (ptr) tSel_v9876)+22) ) = 1; break; default: (* (( (ptr) tSel_v9876)+22) ) = 1; break; }; }; break; case 1: SOURCE(11341, 10) ok_v9988 = 0; SOURCE(11353, 110) { word var_c34692; var_c34692 = (* (( (ptr) tSel_v9876)+22) ); switch (var_c34692) { case 0: (* (( (ptr) tSel_v9876)+22) ) = 1; break; case 1: (* (( (ptr) tSel_v9876)+22) ) = 2; break; case 2: (* (( (ptr) tSel_v9876)+22) ) = 3; break; default: (* (( (ptr) tSel_v9876)+22) ) = 4; break; }; }; break; default: SOURCE(11477, 5) (void) XR_RaiseUnnamedError(); break; }; }; SOURCE(11484, 1362) { word var_c34724; var_c34724 = (* (( (ptr) tSel_v9876)+22) ); switch (var_c34724) { case 4: case 3: SOURCE(11531, 317) if ((end_v9960 == 1)) { SOURCE(11551, 78) if (((* (( (ptr) tSel_v9876)+22) ) == 4)) { SOURCE(11583, 46) { word pd69; pd69 = (* (( (ptr) (* (( (ptr) gf_c37924)+79)/* var_c34212 */ ))+26) ); (* (ptr) &sp_v10016 ) = (word) ( *( (fPt) ((* (ptr) pd69 ))))((* (ptr) (&sp_v10016) ), pd69); }; }; SOURCE(11631, 51) if ( ( (0 != ok_v9988) ? ((* (ptr) &sp_v10016 ) == (* (( (ptr) tSel_v9876)+11) )) : 0 ) ) { SOURCE(11676, 6) return; }; SOURCE(11684, 65) { word var_c34756; { word pd70; word x71; pd70 = (* (( (ptr) (* (( (ptr) gf_c37924)+78)/* var_c33828 */ ))+6) ); var_c34756 = ((x71 = (word) ( *( (fPt) ((* (ptr) pd70 ))))((* (ptr) (&sp_v10016) ), pd70), MAX((int)(word), x71, 1)) - 1); }; (* (( (ptr) tSel_v9876)+11) ) = (* (ptr) &sp_v10016 ); (* (( (ptr) tSel_v9876)+12) ) = var_c34756; }; } else { SOURCE(11760, 53) if ( ( (0 != ok_v9988) ? ((* (ptr) &sp_v10016 ) == (* (( (ptr) tSel_v9876)+2) )) : 0 ) ) { SOURCE(11807, 6) return; }; SOURCE(11815, 33) (* (( (ptr) tSel_v9876)+2) ) = (* (ptr) &sp_v10016 ); (* (( (ptr) tSel_v9876)+3) ) = 0; }; break; case 2: SOURCE(11864, 750) { word prev_v10104; word start_v10132; word endPos_v10160; word node_v10188; word prevNode_v10216 = 0; word punc_v10244 = 0; SOURCE(11892, 32) node_v10188 = (* (ptr) &sp_v10016 ); SOURCE(11991, 56) { W3 var_c34852; (void) ExpandToWord_P780((word) &var_c34852, (* (W2Pt) &sp_v10016 ), (end_v9960 == 0)); punc_v10244 = var_c34852.f2; endPos_v10160 = var_c34852.f1; start_v10132 = var_c34852.f0; }; SOURCE(12049, 560) if ((end_v9960 == 1)) { { word var_c34884; SOURCE(12069, 28) prevNode_v10216 = (* (( (ptr) tSel_v9876)+11) ); SOURCE(12099, 24) (* (( (ptr) tSel_v9876)+11) ) = node_v10188; SOURCE(12125, 105) if (((* (( (ptr) tSel_v9876)+23) ) != 1)) { SOURCE(12160, 29) (* (( (ptr) tSel_v9876)+23) ) = punc_v10244; } else { SOURCE(12189, 41) if ((punc_v10244 == 2)) { SOURCE(12213, 17) endPos_v10160 = (endPos_v10160 - 1); }; }; SOURCE(12232, 25) prev_v10104 = (* (( (ptr) tSel_v9876)+12) ); SOURCE(12259, 72) { word tc72; word tc73; var_c34884 = endPos_v10160; (* (( (ptr) tSel_v9876)+12) ) = endPos_v10160; if (( (int)var_c34884 == (int)prev_v10104)) { tc73 = (word) (0 != ok_v9988); } else { tc73 = (word) 0; }; if (tc73) { tc72 = (word) (node_v10188 == prevNode_v10216); } else { tc72 = (word) 0; }; if (tc72) { SOURCE(12325, 6) return; }; }; }; } else { { word var_c34916; SOURCE(12342, 30) prevNode_v10216 = (* (( (ptr) tSel_v9876)+2) ); SOURCE(12374, 26) (* (( (ptr) tSel_v9876)+2) ) = node_v10188; SOURCE(12402, 103) if (((* (( (ptr) tSel_v9876)+23) ) != 2)) { SOURCE(12438, 29) (* (( (ptr) tSel_v9876)+23) ) = punc_v10244; } else { SOURCE(12467, 38) if ((punc_v10244 == 1)) { SOURCE(12490, 15) start_v10132 = (start_v10132 + 1); }; }; SOURCE(12507, 27) prev_v10104 = (* (( (ptr) tSel_v9876)+3) ); SOURCE(12536, 73) { word tc74; word tc75; var_c34916 = start_v10132; (* (( (ptr) tSel_v9876)+3) ) = start_v10132; if (( (int)var_c34916 == (int)prev_v10104)) { tc75 = (word) (0 != ok_v9988); } else { tc75 = (word) 0; }; if (tc75) { tc74 = (word) (node_v10188 == prevNode_v10216); } else { tc74 = (word) 0; }; if (tc74) { SOURCE(12603, 6) return; }; }; }; }; }; break; case 1: case 0: SOURCE(12634, 186) if ((end_v9960 == 1)) { SOURCE(12654, 59) if ( ( ( (XR_EqualWords((( (ptr) tSel_v9876)+11), &sp_v10016, 9)) ? (0 != ok_v9988) : 0 ) ? ((* (( (ptr) tSel_v9876)+22) ) == 1) : 0 ) ) { SOURCE(12707, 6) return; }; SOURCE(12715, 15) (* (W9Pt) (( (ptr) tSel_v9876)+11) ) = sp_v10016; } else { SOURCE(12740, 61) if ( ( ( (XR_EqualWords((( (ptr) tSel_v9876)+2), &sp_v10016, 9)) ? (0 != ok_v9988) : 0 ) ? ((* (( (ptr) tSel_v9876)+22) ) == 1) : 0 ) ) { SOURCE(12795, 6) return; }; SOURCE(12803, 17) (* (W9Pt) (( (ptr) tSel_v9876)+2) ) = sp_v10016; }; SOURCE(12823, 23) (* (( (ptr) tSel_v9876)+22) ) = 1; break; default: SOURCE(12862, 5) (void) XR_RaiseUnnamedError(); break; }; }; SOURCE(12899, 20) (* (( (ptr) tSel_v9876)+24) ) = end_v9960; SOURCE(12921, 25) (* (( (ptr) tSel_v9876)+26) ) = (* (( (ptr) formal_c37956)+7) ); SOURCE(12948, 17) (void) SetSelLooks_P660(tSel_v9876); SOURCE(12967, 85) { word pd76; pd76 = (* (( (ptr) (* (( (ptr) gf_c37924)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd76 ))))(tSel_v9876, (* (( (ptr) formal_c37956)+6) ), ( (end_v9960 == 1) ? (0 != ok_v9988) : 0 ) , ( (end_v9960 == 0) ? (0 != ok_v9988) : 0 ) , 0, pd76) ; }; } static void SetSelLooks_P660(sel_v6476) word sel_v6476; { register ptr gf_c37988 = (ptr) &globalframe; W2 loc_v10288; word size_v10316; /* SetSelLooks: */ SOURCE(13103, 353) SOURCE(13163, 86) { word tcp77; if (((* (( (ptr) sel_v6476)+24) ) == 0)) { tcp77 = (word) (( (ptr) sel_v6476)+2); } else { tcp77 = (word) (( (ptr) sel_v6476)+11); }; loc_v10288 = (* (W2Pt) tcp77 ); }; SOURCE(13251, 35) { word pd78; pd78 = (* (( (ptr) (* (( (ptr) gf_c37988)+78)/* var_c33828 */ ))+6) ); size_v10316 = (word) ( *( (fPt) ((* (ptr) pd78 ))))(loc_v10288.f0, pd78); }; SOURCE(13288, 168) { word var_c34948; { word pd79; word pd80; if (( (int)size_v10316 <= (int)0)) { var_c34948 = 0; } else { if (( (int)loc_v10288.f1 >= (int)size_v10316)) { pd79 = (* (( (ptr) (* (( (ptr) gf_c37988)+78)/* var_c33828 */ ))+5) ); var_c34948 = (word) ( *( (fPt) ((* (ptr) pd79 ))))(loc_v10288.f0, (size_v10316 - 1), pd79); } else { pd80 = (* (( (ptr) (* (( (ptr) gf_c37988)+78)/* var_c33828 */ ))+5) ); var_c34948 = (word) ( *( (fPt) ((* (ptr) pd80 ))))(loc_v10288.f0, loc_v10288.f1, pd80); }; }; }; (* (( (ptr) sel_v6476)+25) ) = var_c34948; }; } static void Update_P720(viewer_v6536, tdd_v6564, x_v6592, y_v6620, sel_v6648, pDel_v6676) word viewer_v6536; word tdd_v6564; word x_v6592; word y_v6620; word sel_v6648; word pDel_v6676; { register ptr gf_c38020 = (ptr) &globalframe; word refSel_v10360; /* Update: */ SOURCE(13460, 524) SOURCE(13615, 131) refSel_v10360 = ( (sel_v6648 == 0) ? (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38020)+75)/* var_c33540 */ ))+4) ) ) : ( (sel_v6648 == 1) ? (* (ptr) (* ( ( (ptr) (* (( (ptr) gf_c38020)+75)/* var_c33540 */ ))+5) ) ) : ( XR_RaiseUnnamedError(), 0 ) ) ) ; SOURCE(13748, 236) { word var_c34980; var_c34980 = (* (( (ptr) refSel_v10360)+22) ); switch (var_c34980) { case 2: SOURCE(13787, 40) (void) SelectWord_P300(viewer_v6536, tdd_v6564, x_v6592, y_v6620, sel_v6648, pDel_v6676); break; case 3: SOURCE(13837, 40) (void) SelectNode_P360(viewer_v6536, tdd_v6564, x_v6592, y_v6620, sel_v6648, pDel_v6676); break; case 4: SOURCE(13889, 42) (void) SelectBranch_P420(viewer_v6536, tdd_v6564, x_v6592, y_v6620, sel_v6648, pDel_v6676); break; default: SOURCE(13944, 40) (void) SelectChar_P240(viewer_v6536, tdd_v6564, x_v6592, y_v6620, sel_v6648, pDel_v6676); break; }; }; } static void ExpandToWord_P780(formal_c0253, pos_v6736, frontOnly_v6764) word formal_c0253; W2 pos_v6736; word frontOnly_v6764; { register ptr gf_c38052 = (ptr) &globalframe; word start_v6808; word end_v6836; word punc_v6864; word refChar_v10404; word char_v10432; word alpha_v10460; word node_v10488; word lastOffset_v10516; word ropeReader_v10544; /* ExpandToWord: */ SOURCE(13990, 1410) SOURCE(13990, 1410) punc_v6864 = 0; SOURCE(14182, 37) node_v10488 = pos_v6736.f0; SOURCE(14221, 39) { word pd81; pd81 = (* (( (ptr) (* (( (ptr) gf_c38052)+78)/* var_c33828 */ ))+6) ); lastOffset_v10516 = ((word) ( *( (fPt) ((* (ptr) pd81 ))))(node_v10488, pd81) - 1); }; SOURCE(14262, 55) { word pd82; pd82 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+26) ); ropeReader_v10544 = (word) ( *( (fPt) ((* (ptr) pd82 ))))(pd82); }; SOURCE(14319, 23) { word var_c35044; var_c35044 = pos_v6736.f1; end_v6836 = var_c35044; start_v6808 = var_c35044; }; SOURCE(14344, 68) { word reader_v32044; word rope_v32072; word index_v32100; word var_c35108; word rope_v18280; reader_v32044 = ropeReader_v10544; { word pd83; pd83 = (* (( (ptr) (* (( (ptr) gf_c38052)+82)/* var_c35076 */ ))+4) ); rope_v32072 = (word) ( *( (fPt) ((* (ptr) pd83 ))))(node_v10488, pd83); }; index_v32100 = end_v6836; { word tc84; rope_v18280 = 0; var_c35108 = (* (( (ptr) reader_v32044)+2) ); if (((var_c35108 == rope_v32072) )) { tc84 = (word) ( (int)((* (( (ptr) reader_v32044)+3) ) + (* (( (ptr) reader_v32044)+1) )) == (int)index_v32100); } else { tc84 = (word) 0; }; if (tc84) { goto lab_L100011; }; }; (* (( (ptr) reader_v32044)+2) ) = rope_v32072; (* (( (ptr) reader_v32044)+1) ) = 0; (* (hPt) (* (ptr) reader_v32044 ) ) = 0; (* (( (ptr) reader_v32044)+3) ) = index_v32100; lab_L100011: ; }; SOURCE(14414, 52) { word reader_v32164; reader_v32164 = ropeReader_v10544; (* (( (ptr) reader_v32164)+5) ) = 13; (* (( (ptr) reader_v32164)+4) ) = 1; }; SOURCE(14501, 36) { word var_c35140; word text_v16688; word i_v16732; text_v16688 = (* (ptr) ropeReader_v10544 ); i_v16732 = (* (( (ptr) ropeReader_v10544)+1) ); { word pd86; if ((i_v16732 < (* (hPt) text_v16688 ))) { (* (( (ptr) ropeReader_v10544)+1) ) = (i_v16732 + 1); { word limit85; var_c35140 = (word) (* ((( (bPt) text_v16688)+4)+( limit85 = (word) (* (( (hPt) text_v16688)+1) ), BCK(i_v16732, limit85) )) ); }; } else { pd86 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+17) ); var_c35140 = (word) ( *( (fPt) ((* (ptr) pd86 ))))(ropeReader_v10544, 0, pd86); }; }; refChar_v10404 = var_c35140; }; SOURCE(14539, 90) { word var_c35204; var_c35204 = refChar_v10404; if ((var_c35204 == 13) || (var_c35204 == 10)) { SOURCE(14583, 37) { word pd87; pd87 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+27) ); (void) ( *( (fPt) ((* (ptr) pd87 ))))(ropeReader_v10544, pd87); }; SOURCE(14622, 7) goto lab_L100009; }; }; SOURCE(14665, 37) alpha_v10460 = ((word) (* (( (bPt) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38052)+83)/* var_c35236 */ ))+4) ) ))+refChar_v10404) ) == 2); SOURCE(14704, 33) { word var_c35268; word text_v32356; word i_v32384; text_v32356 = (* (ptr) ropeReader_v10544 ); i_v32384 = (* (( (ptr) ropeReader_v10544)+1) ); { word pd89; if ((i_v32384 < (* (hPt) text_v32356 ))) { (* (( (ptr) ropeReader_v10544)+1) ) = (i_v32384 + 1); { word limit88; var_c35268 = (word) (* ((( (bPt) text_v32356)+4)+( limit88 = (word) (* (( (hPt) text_v32356)+1) ), BCK(i_v32384, limit88) )) ); }; } else { pd89 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+17) ); var_c35268 = (word) ( *( (fPt) ((* (ptr) pd89 ))))(ropeReader_v10544, 0, pd89); }; }; char_v10432 = var_c35268; }; SOURCE(14740, 131) lab_L100016: ; { word tc90; word tc91; if ((0 != alpha_v10460)) { tc91 = (word) ((word) (* (( (bPt) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38052)+83)/* var_c35236 */ ))+4) ) ))+char_v10432) ) == 2); } else { tc91 = (word) 0; }; if (tc91 || (char_v10432 == refChar_v10404)) { tc90 = (word) ( (int)end_v6836 < (int)lastOffset_v10516); } else { tc90 = (word) 0; }; if (tc90) { } else { goto lab_L100014; }; }; SOURCE(14825, 33) { word var_c35332; word text_v32284; word i_v32312; text_v32284 = (* (ptr) ropeReader_v10544 ); i_v32312 = (* (( (ptr) ropeReader_v10544)+1) ); { word pd93; if ((i_v32312 < (* (hPt) text_v32284 ))) { (* (( (ptr) ropeReader_v10544)+1) ) = (i_v32312 + 1); { word limit92; var_c35332 = (word) (* ((( (bPt) text_v32284)+4)+( limit92 = (word) (* (( (hPt) text_v32284)+1) ), BCK(i_v32312, limit92) )) ); }; } else { pd93 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+17) ); var_c35332 = (word) ( *( (fPt) ((* (ptr) pd93 ))))(ropeReader_v10544, 0, pd93); }; }; char_v10432 = var_c35332; }; SOURCE(14860, 11) end_v6836 = (end_v6836 + 1); goto lab_L100016; lab_L100014: ; SOURCE(14882, 105) if ( ( ( ( (0 != (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38052)+84)/* var_c35396 */ ))+13) ) )) ? (0 == frontOnly_v6764) : 0 ) ? (0 != alpha_v10460) : 0 ) ? (char_v10432 == 32) : 0 ) ) { SOURCE(14959, 15) punc_v6864 = 2; SOURCE(14976, 11) end_v6836 = (end_v6836 + 1); }; SOURCE(14992, 70) { word reader_v31896; word rope_v31924; word index_v31952; word var_c35428; word rope_v32000; reader_v31896 = ropeReader_v10544; { word pd94; pd94 = (* (( (ptr) (* (( (ptr) gf_c38052)+82)/* var_c35076 */ ))+4) ); rope_v31924 = (word) ( *( (fPt) ((* (ptr) pd94 ))))(node_v10488, pd94); }; index_v31952 = start_v6808; { word tc95; rope_v32000 = 0; var_c35428 = (* (( (ptr) reader_v31896)+2) ); if (((var_c35428 == rope_v31924) )) { tc95 = (word) ( (int)((* (( (ptr) reader_v31896)+3) ) + (* (( (ptr) reader_v31896)+1) )) == (int)index_v31952); } else { tc95 = (word) 0; }; if (tc95) { goto lab_L100019; }; }; (* (( (ptr) reader_v31896)+2) ) = rope_v31924; (* (( (ptr) reader_v31896)+1) ) = 0; (* (hPt) (* (ptr) reader_v31896 ) ) = 0; (* (( (ptr) reader_v31896)+3) ) = index_v31952; lab_L100019: ; }; SOURCE(15064, 39) { word var_c35460; word reader_v32596; reader_v32596 = ropeReader_v10544; { word i_v16036; i_v16036 = (* (( (ptr) reader_v32596)+1) ); { word pd97; if ((i_v16036 > 0)) { { word var_c35524; word var_c35556; var_c35524 = SGNCK((i_v16036 - 1)); (* (( (ptr) reader_v32596)+1) ) = var_c35524; var_c35556 = (* (ptr) reader_v32596 ); { word limit96; var_c35460 = (word) (* ((( (bPt) var_c35556)+4)+( limit96 = (word) (* (( (hPt) var_c35556)+1) ), BCK(var_c35524, limit96) )) ); }; }; } else { pd97 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+17) ); var_c35460 = (word) ( *( (fPt) ((* (ptr) pd97 ))))(reader_v32596, 1, pd97); }; }; }; char_v10432 = var_c35460; }; SOURCE(15105, 134) lab_L100023: ; { word tc98; word tc99; if ((0 != alpha_v10460)) { tc99 = (word) ((word) (* (( (bPt) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38052)+83)/* var_c35236 */ ))+4) ) ))+char_v10432) ) == 2); } else { tc99 = (word) 0; }; if (tc99 || (char_v10432 == refChar_v10404)) { tc98 = (word) ( (int)start_v6808 > (int)0); } else { tc98 = (word) 0; }; if (tc98) { } else { goto lab_L100021; }; }; SOURCE(15183, 39) { word var_c35620; word reader_v32520; reader_v32520 = ropeReader_v10544; { word i_v32552; i_v32552 = (* (( (ptr) reader_v32520)+1) ); { word pd101; if ((i_v32552 > 0)) { { word var_c35684; word var_c35716; var_c35684 = SGNCK((i_v32552 - 1)); (* (( (ptr) reader_v32520)+1) ) = var_c35684; var_c35716 = (* (ptr) reader_v32520 ); { word limit100; var_c35620 = (word) (* ((( (bPt) var_c35716)+4)+( limit100 = (word) (* (( (hPt) var_c35716)+1) ), BCK(var_c35684, limit100) )) ); }; }; } else { pd101 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+17) ); var_c35620 = (word) ( *( (fPt) ((* (ptr) pd101 ))))(reader_v32520, 1, pd101); }; }; }; char_v10432 = var_c35620; }; SOURCE(15224, 15) start_v6808 = (start_v6808 - 1); goto lab_L100023; lab_L100021: ; SOURCE(15250, 107) if ( ( ( ( (0 != (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38052)+84)/* var_c35396 */ ))+13) ) )) ? (punc_v6864 == 0) : 0 ) ? (0 != alpha_v10460) : 0 ) ? (char_v10432 == 32) : 0 ) ) { SOURCE(15326, 14) punc_v6864 = 1; SOURCE(15342, 15) start_v6808 = (start_v6808 - 1); }; SOURCE(15363, 37) { word pd102; pd102 = (* (( (ptr) (* (( (ptr) gf_c38052)+81)/* var_c35012 */ ))+27) ); (void) ( *( (fPt) ((* (ptr) pd102 ))))(ropeReader_v10544, pd102); }; /* removed tail goto */ lab_L100009: ; (* (ptr) formal_c0253 ) = start_v6808; (* (( (ptr) formal_c0253)+1) ) = end_v6836; (* (( (ptr) formal_c0253)+2) ) = punc_v6864; return; } static word SetInsertion_P840(sel_v6924, x_v6952, line_v6980, rightOfLine_v7008, tdd_v7036) word sel_v6924; word x_v6952; word line_v6980; word rightOfLine_v7008; word tdd_v7036; { register ptr gf_c38084 = (ptr) &globalframe; word var_c7080; word node_v10588; word size_v10616; /* SetInsertion: */ SOURCE(15406, 1254) SOURCE(15574, 47) node_v10588 = (* (( (ptr) sel_v6924)+2) ); SOURCE(15623, 31) { word pd103; pd103 = (* (( (ptr) (* (( (ptr) gf_c38084)+78)/* var_c33828 */ ))+6) ); size_v10616 = (word) ( *( (fPt) ((* (ptr) pd103 ))))(node_v10588, pd103); }; SOURCE(15656, 81) if ( ( ( (int)(* (( (ptr) sel_v6924)+4) ) == (int)(* (( (ptr) sel_v6924)+13) )) ? ( (int)(* (( (ptr) sel_v6924)+3) ) >= (int)size_v10616) : 0 ) ) { SOURCE(15722, 15) return(0); }; SOURCE(15739, 354) { word var_c35780; word var_c35812; var_c35780 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38084)+84)/* var_c35396 */ ))+19) ) ); if ((var_c35780 == 0)) { SOURCE(15789, 139) { word tc104; word limit105; if ( ( ( (XR_EqualWords((( (ptr) sel_v6924)+2), (( (ptr) sel_v6924)+11), 2)) ? ((* (( (ptr) sel_v6924)+22) ) == 1) : 0 ) ? (0 != rightOfLine_v7008) : 0 ) ) { var_c35812 = (* (( (ptr) tdd_v7036)+1) ); tc104 = (word) (( (((unsigned)(* (( (ptr) (( (W9Pt) (( (ptr) var_c35812)+3))+( limit105 = (* (( (ptr) var_c35812)+2) ), BCK(line_v6980, limit105) )))+2) ) << 1) >> 1) ) == 0); } else { tc104 = (word) 0; }; if (tc104) { return(1); } else { return(0); }; }; } else { if ((var_c35780 == 1)) { SOURCE(15939, 154) if ( ( ( ( ( (int)(* (( (ptr) sel_v6924)+3) ) == (int)0) ? XR_EqualWords((( (ptr) sel_v6924)+2), (( (ptr) sel_v6924)+11) , 2) : 0 ) ? ((* (( (ptr) sel_v6924)+22) ) == 1) : 0 ) ? ( (int)(x_v6952 - (* (( (ptr) sel_v6924)+5) )) <= (int)(((* ( ( (ptr) sel_v6924)+14) ) + (* (( (ptr) sel_v6924)+16) )) - x_v6952)) : 0 ) ) { return(0); } else { return(1); }; }; }; }; SOURCE(16104, 480) if (( (int)(* (( (ptr) sel_v6924)+4) ) == (int)line_v6980)) { { word var_c35876; word c_v32644; word var_c35940; word c_v13372; SOURCE(16134, 41) if (( (int)(* (( (ptr) sel_v6924)+13) ) != (int)line_v6980)) { SOURCE(16160, 15) return(0); }; SOURCE(16177, 49) if (( (int)(* (( (ptr) sel_v6924)+3) ) >= (int)size_v10616)) { SOURCE(16211, 15) return(0); }; SOURCE(16228, 231) if ((0 != rightOfLine_v7008)) { SOURCE(16250, 209) { word tc106; if ( ( (XR_EqualWords((( (ptr) sel_v6924)+2), (( (ptr) sel_v6924)+11), 2)) ? ( (int)((* (( (ptr) sel_v6924)+3) ) + 1) < (int)size_v10616) : 0 ) ) { { word pd107; pd107 = (* (( (ptr) (* (( (ptr) gf_c38084)+78)/* var_c33828 */ ))+4) ); c_v32644 = (word) ( *( (fPt) ((* (ptr) pd107 ))))(node_v10588, (* (( (ptr) sel_v6924)+3) ), pd107); }; { word tc108; if (((c_v32644 >> 8) == 0)) { c_v13372 = (c_v32644 & 0377); var_c35940 = ((word) (* (( (bPt) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38084)+83)/* var_c35236 */ ))+4) ) ))+c_v13372) ) == 1); tc108 = (word) (0 != var_c35940); } else { tc108 = (word) 0; }; var_c35876 = tc108; }; tc106 = (word) (0 != var_c35876); } else { tc106 = (word) 0; }; if (tc106) { return(0); } else { return(1); }; }; }; SOURCE(16464, 72) if (( (int)(x_v6952 - (* (( (ptr) sel_v6924)+5) )) <= (int)(((* (( (ptr) sel_v6924)+14) ) + (* (( (ptr) sel_v6924)+16) )) - x_v6952))) { return(0); } else { return(1); }; }; } else { SOURCE(16545, 39) if (( (int)(* (( (ptr) sel_v6924)+13) ) == (int)line_v6980)) { SOURCE(16571, 13) return(1); }; }; SOURCE(16586, 74) if (( (int)(line_v6980 - (* (( (ptr) sel_v6924)+4) )) <= (int)((* (( (ptr) sel_v6924)+13) ) - line_v6980))) { return(0); } else { return(1); }; } static word ResolveToChar_P900(selection_v7140, viewer_v7168, tdd_v7196, x_v7224, y_v7252) word selection_v7140; word viewer_v7168; word tdd_v7196; word x_v7224; word y_v7252; { register ptr gf_c38116 = (ptr) &globalframe; word rightOfLine_v7296; word lines_v10660 = 0; word line_v10688 = 0; word lastLine_v10716; /* ResolveToChar: */ SOURCE(16699, 1186) (void) (XR_MonitorEntry((word) (( (bPt) gf_c38116)+16)/* LOCK_v3504 */ )); SOURCE(16965, 21) lines_v10660 = (* (( (ptr) tdd_v7196)+1) ); SOURCE(16988, 32) { word var_c35972; var_c35972 = (* (ptr) lines_v10660 ); lastLine_v10716 = var_c35972; line_v10688 = var_c35972; }; SOURCE(17022, 31) y_v7252 = (y_v7252 - (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38116)+84)/* var_c35396 */ ))+17) ) )); SOURCE(17104, 454) { word limit109; word limit110; if (( (int)y_v7252 > (int)((* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit109 = (* (( (ptr) lines_v10660)+2) ), BCK(lastLine_v10716, limit109) )))+6) ) + (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit110 = (* (( (ptr) lines_v10660)+2) ), BCK(lastLine_v10716, limit110) )))+4) )))) { SOURCE(17187, 16) x_v7224 = ((* (( (ptr) viewer_v7168)+7) ) + 10); } else { SOURCE(17212, 346) { register word n_v10760 = 1; register word noName_c36004; noName_c36004 = lastLine_v10716; if (( (int)n_v10760 > (int)noName_c36004)) { goto lab_L100027; }; lab_L100030: ; SOURCE(17274, 284) { word limit111; if (( (int)(* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit111 = (* (( (ptr) lines_v10660)+2) ), BCK(n_v10760, limit111) )))+6) ) >= (int)y_v7252)) { SOURCE(17304, 262) { word bottomOfUpper_v10804; word topOfLower_v10832; word break_v10860; SOURCE(17306, 62) { word var_c36036; word var_c0417; word var_c36068; word var_c0418; { word limit112; var_c36036 = (n_v10760 - 1); var_c0417 = (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit112 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(var_c36036, limit112) /*1*/ )))+6) ); }; { word limit113; var_c36068 = (n_v10760 - 1); var_c0418 = (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit113 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(var_c36068, limit113) /*1*/ )))+4) ); }; bottomOfUpper_v10804 = (var_c0417 + var_c0418); }; SOURCE(17370, 54) { word limit114; word limit115; topOfLower_v10832 = ((* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit114 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(n_v10760, limit114) /*1*/ )))+6) ) - (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit115 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(n_v10760, limit115) /*1*/ )))+3) )); }; SOURCE(17426, 95) { word var_c36100; word var_c0419; word var_c0420; { word limit116; var_c36100 = (n_v10760 - 1); var_c0419 = (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit116 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(var_c36100, limit116) /*1*/ )))+6) ); }; { word x117; var_c0420 = (x117 = IOP2( / , (int)(bottomOfUpper_v10804 + topOfLower_v10832), (int)2), /*1*/ MAX((int)(word), x117, var_c0419)); }; { word limit118; word x119; break_v10860 = (x119 = ((* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( /*1*/ limit118 = (* (( (ptr) lines_v10660)+2) ), /*1*/ BCK(n_v10760, limit118) /*1*/ )))+6) ) - 1), /*1*/ MIN((int)(word), var_c0420, x119)); }; }; SOURCE(17523, 35) if (( (int)y_v7252 < (int)break_v10860)) { line_v10688 = (n_v10760 - 1); } else { line_v10688 = n_v10760; }; SOURCE(17560, 4) goto lab_L100028; }; }; }; if (( (int)n_v10760 >= (int)noName_c36004)) { goto lab_L100027; }; n_v10760 = (n_v10760 + 1); goto lab_L100030; lab_L100027: ; lab_L100028: ; }; }; }; SOURCE(17578, 58) { word limit120; word limit121; (* (( (ptr) selection_v7140)+6) ) = ((* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit120 = (* (( (ptr) lines_v10660)+2) ), BCK(line_v10688, limit120) )))+6) ) - (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit121 = (* (( (ptr) lines_v10660)+2) ), BCK(line_v10688, limit121) )))+3) )); }; SOURCE(17638, 86) { word limit122; word limit123; word x124; word x125; word idx126; (* (( (ptr) selection_v7140)+8) ) = ( idx126 = (word) ((* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit122 = (* (( (ptr) lines_v10660)+2) ), BCK(line_v10688, limit122) )))+3) ) + (x124 = (* (( (ptr) (( (W9Pt) (( (ptr) lines_v10660)+3))+( limit123 = (* (( (ptr) lines_v10660)+2) ), BCK(line_v10688, limit123) )))+4) ), x125 = (* (( (ptr) gf_c38116)+13)/* selectionDescentLimit_v4008 */ ), MIN( (unsigned) , x124, x125))), SGNCK(idx126) ); }; SOURCE(17726, 27) (* (( (ptr) selection_v7140)+4) ) = line_v10688; SOURCE(17755, 21) (void) GetLine_P1320(viewer_v7168, line_v10688); SOURCE(17778, 107) { W5 var_c36132; { word pd127; pd127 = (* (( (ptr) (* (( (ptr) gf_c38116)+74)/* var_c33444 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd127 ))))((word) &var_c36132, (* (( (ptr) gf_c38116)+16)/* lineInfo_v4260 */ ), x_v7224, pd127) ; }; rightOfLine_v7296 = var_c36132.f4; (* (( (ptr) selection_v7140)+7) ) = var_c36132.f3; (* (( (ptr) selection_v7140)+5) ) = var_c36132.f2; (* (W2Pt) (( (ptr) selection_v7140)+2) ) = (* (W2Pt) &var_c36132 ); }; SOURCE(16699, 1186) (void) (XR_MonitorExit((word) (( (bPt) gf_c38116)+16)/* LOCK_v3504 */ )); return(rightOfLine_v7296); } static void GrowSelectionToBlanks_P960() { W6 var_c38148; /* declaration of var_c36164 skipped */ /* GrowSelectionToBlanks: */ SOURCE(17891, 159) { word tmpAddr128; tmpAddr128 = (word) (( (ptr) &var_c38148)+4)/* var_c36164 */ ; (* (ptr) tmpAddr128 ) = ( ((word) (fPt) Blank_P2220) ); (* (( (ptr) tmpAddr128) + 1) ) = 1; }; SOURCE(18010, 40) (void) GrowSelectionToSomething_P1020((word) (( (bPt) &var_c38148)+16)/* var_c36164 */ , (word) (( (bPt) &var_c38148)+16) /* var_c36164 */ ); } static word Blank_P2220(char_v10980, formal_c38212) word char_v10980; word formal_c38212; { register ptr gf_c38180 = (ptr) &globalframe; word var_c11024; formal_c38212 = (formal_c38212 - 16); /* Blank: */ SOURCE(17930, 77) SOURCE(17977, 30) return(((word) (* (( (bPt) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38180)+83)/* var_c35236 */ ))+4) ) ))+char_v10980) ) == 1)); } static void GrowSelectionToSomething_P1020(left_v7372, right_v7400) word left_v7372; word right_v7400; { register ptr gf_c38244 = (ptr) &globalframe; word tSel_v11052 = 0; word cSel_v11080 = 0; word selection_v11108; word start_v11136 = 0; word end_v11164 = 0; word startPos_v11192; word endPos_v11220; word endLen_v11248; word ropeReader_v11276 = 0; /* GrowSelectionToSomething: */ SOURCE(18054, 1692) SOURCE(18309, 26) cSel_v11080 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+5) ) ); SOURCE(18337, 21) selection_v11108 = 1; SOURCE(18360, 100) if ((cSel_v11080 == 0) || ((* (ptr) (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+5) ) ) ) == 0)) { SOURCE(18413, 26) cSel_v11080 = (* (ptr) (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+4) ) ); SOURCE(18441, 19) selection_v11108 = 0; }; SOURCE(18465, 42) if ((cSel_v11080 == 0) || ((* (ptr) cSel_v11080 ) == 0)) { SOURCE(18501, 6) return; }; SOURCE(18509, 29) { word pd129; pd129 = (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+10) ); tSel_v11052 = (word) ( *( (fPt) ((* (ptr) pd129 ))))(pd129); }; SOURCE(18540, 45) { word pd130; pd130 = (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+12) ); (void) ( *( (fPt) ((* (ptr) pd130 ))))(cSel_v11080, tSel_v11052, pd130); }; SOURCE(18587, 27) start_v11136 = (* (( (ptr) tSel_v11052)+2) ); SOURCE(18616, 39) { word pd131; pd131 = (* (( (ptr) (* (( (ptr) gf_c38244)+81)/* var_c35012 */ ))+26) ); ropeReader_v11276 = (word) ( *( (fPt) ((* (ptr) pd131 ))))(pd131); }; SOURCE(18657, 86) { word reader_v31748; word rope_v31776; word index_v31804; word var_c36196; word rope_v31852; reader_v31748 = ropeReader_v11276; { word pd132; pd132 = (* (( (ptr) (* (( (ptr) gf_c38244)+82)/* var_c35076 */ ))+4) ); rope_v31776 = (word) ( *( (fPt) ((* (ptr) pd132 ))))(start_v11136, pd132); }; index_v31804 = (* (( (ptr) tSel_v11052)+3) ); { word tc133; rope_v31852 = 0; var_c36196 = (* (( (ptr) reader_v31748)+2) ); if (((var_c36196 == rope_v31776) )) { tc133 = (word) ( (int)((* (( (ptr) reader_v31748)+3) ) + (* (( (ptr) reader_v31748)+1) )) == (int)index_v31804); } else { tc133 = (word) 0; }; if (tc133) { goto lab_L100032; }; }; (* (( (ptr) reader_v31748)+2) ) = rope_v31776; (* (( (ptr) reader_v31748)+1) ) = 0; (* (hPt) (* (ptr) reader_v31748 ) ) = 0; (* (( (ptr) reader_v31748)+3) ) = index_v31804; lab_L100032: ; }; SOURCE(18745, 200) lab_L100035: ; SOURCE(18745, 200) { word loc_v11320; word var_c36228; SOURCE(18798, 42) loc_v11320 = ((* (( (ptr) ropeReader_v11276)+3) ) + (* (( (ptr) ropeReader_v11276)+1) )); SOURCE(18842, 30) if (( (int)loc_v11320 == (int)0)) { SOURCE(18860, 12) startPos_v11192 = 0; SOURCE(18874, 5) goto lab_L100034; }; SOURCE(18882, 63) { word var_c36260; word reader_v32444; reader_v32444 = ropeReader_v11276; { word i_v32476; i_v32476 = (* (( (ptr) reader_v32444)+1) ); { word pd135; if ((i_v32476 > 0)) { { word var_c36324; word var_c36356; var_c36324 = SGNCK((i_v32476 - 1)); (* (( (ptr) reader_v32444)+1) ) = var_c36324; var_c36356 = (* (ptr) reader_v32444 ); { word limit134; var_c36260 = (word) (* ((( (bPt) var_c36356)+4)+( /*1*/ limit134 = (word) (* (( (hPt) var_c36356)+1) ), /*1*/ BCK(var_c36324, limit134) /*1*/ )) ); }; }; } else { pd135 = (* (( (ptr) (* (( (ptr) gf_c38244)+81)/* var_c35012 */ ))+17) ); var_c36260 = (word) ( *( (fPt) ((* (ptr) pd135 ))))(reader_v32444, 1, pd135); }; }; }; var_c36228 = var_c36260; }; if ((0 != (word) ( *( (fPt) ((* (ptr) left_v7372 ))))(var_c36228, left_v7372))) { SOURCE(18931, 14) startPos_v11192 = loc_v11320; SOURCE(18947, 5) goto lab_L100034; }; }; goto lab_L100035; lab_L100034: ; SOURCE(18964, 31) (* (( (ptr) tSel_v11052)+3) ) = startPos_v11192; SOURCE(18997, 23) end_v11164 = (* (( (ptr) tSel_v11052)+11) ); SOURCE(19022, 84) if (((* (( (ptr) tSel_v11052)+22) ) == 0)) { endPos_v11220 = (* (( (ptr) tSel_v11052)+12) ); } else { endPos_v11220 = ((* (( (ptr) tSel_v11052)+12) ) + 1); }; SOURCE(19108, 46) { word var_c36420; { word pd136; pd136 = (* (( (ptr) (* (( (ptr) gf_c38244)+82)/* var_c35076 */ ))+4) ); var_c36420 = (word) ( *( (fPt) ((* (ptr) pd136 ))))(end_v11164, pd136); }; { word pd137; pd137 = (* (( (ptr) (* (( (ptr) gf_c38244)+85)/* var_c36452 */ ))+15) ); endLen_v11248 = (word) ( *( (fPt) ((* (ptr) pd137 ))))(var_c36420, pd137); }; }; SOURCE(19156, 70) { word reader_v31600; word rope_v31628; word index_v31656; word var_c36484; word rope_v31704; reader_v31600 = ropeReader_v11276; { word pd138; pd138 = (* (( (ptr) (* (( (ptr) gf_c38244)+82)/* var_c35076 */ ))+4) ); rope_v31628 = (word) ( *( (fPt) ((* (ptr) pd138 ))))(end_v11164, pd138); }; index_v31656 = endPos_v11220; { word tc139; rope_v31704 = 0; var_c36484 = (* (( (ptr) reader_v31600)+2) ); if (((var_c36484 == rope_v31628) )) { tc139 = (word) ( (int)((* (( (ptr) reader_v31600)+3) ) + (* (( (ptr) reader_v31600)+1) )) == (int)index_v31656); } else { tc139 = (word) 0; }; if (tc139) { goto lab_L100038; }; }; (* (( (ptr) reader_v31600)+2) ) = rope_v31628; (* (( (ptr) reader_v31600)+1) ) = 0; (* (hPt) (* (ptr) reader_v31600 ) ) = 0; (* (( (ptr) reader_v31600)+3) ) = index_v31656; lab_L100038: ; }; SOURCE(19228, 200) lab_L100041: ; SOURCE(19228, 200) { word loc_v11364; word var_c36516; SOURCE(19280, 42) loc_v11364 = ((* (( (ptr) ropeReader_v11276)+3) ) + (* (( (ptr) ropeReader_v11276)+1) )); SOURCE(19324, 38) if (( (int)loc_v11364 == (int)endLen_v11248)) { SOURCE(19347, 15) endPos_v11220 = endLen_v11248; SOURCE(19364, 5) goto lab_L100040; }; SOURCE(19372, 56) { word var_c36548; word text_v32212; word i_v32240; text_v32212 = (* (ptr) ropeReader_v11276 ); i_v32240 = (* (( (ptr) ropeReader_v11276)+1) ); { word pd141; if ((i_v32240 < (* (hPt) text_v32212 ))) { (* (( (ptr) ropeReader_v11276)+1) ) = (i_v32240 + 1); { word limit140; var_c36548 = (word) (* ((( (bPt) text_v32212)+4)+( limit140 = (word) (* (( (hPt) text_v32212)+1) ), BCK(i_v32240, limit140) )) ); }; } else { pd141 = (* (( (ptr) (* (( (ptr) gf_c38244)+81)/* var_c35012 */ ))+17) ); var_c36548 = (word) ( *( (fPt) ((* (ptr) pd141 ))))(ropeReader_v11276, 0, pd141); }; }; var_c36516 = var_c36548; }; if ((0 != (word) ( *( (fPt) ((* (ptr) right_v7400 ))))(var_c36516, right_v7400))) { SOURCE(19416, 12) endPos_v11220 = loc_v11364; SOURCE(19430, 5) goto lab_L100040; }; }; goto lab_L100041; lab_L100040: ; SOURCE(19447, 37) { word pd142; pd142 = (* (( (ptr) (* (( (ptr) gf_c38244)+81)/* var_c35012 */ ))+27) ); (void) ( *( (fPt) ((* (ptr) pd142 ))))(ropeReader_v11276, pd142); }; SOURCE(19486, 29) (* (( (ptr) tSel_v11052)+12) ) = (endPos_v11220 - 1); SOURCE(19517, 80) if ( ( ( (int)(endPos_v11220 - startPos_v11192) > (int)1) ? ((* (( (ptr) tSel_v11052)+22) ) == 0) : 0 ) ) { SOURCE(19574, 23) (* (( (ptr) tSel_v11052)+22) ) = 1; }; SOURCE(19599, 55) if (((* (( (ptr) tSel_v11052)+22) ) != 0)) { SOURCE(19632, 22) (* (( (ptr) tSel_v11052)+24) ) = 1; }; SOURCE(19656, 61) { word pd143; pd143 = (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd143 ))))(tSel_v11052, selection_v11108, 0, 0, 1, pd143); }; SOURCE(19719, 27) { word pd144; pd144 = (* (( (ptr) (* (( (ptr) gf_c38244)+75)/* var_c33540 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd144 ))))(tSel_v11052, pd144); }; } static void GrowSelection_P1080() { register ptr gf_c38276 = (ptr) &globalframe; word tSel_v11408 = 0; /* GrowSelection: */ SOURCE(19750, 1254) SOURCE(19812, 72) if (((* (ptr) (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+4) ) ) == 0) || ((* (ptr) (* (ptr) (* (( (ptr) (* ( ( (ptr) gf_c38276)+75)/* var_c33540 */ ))+4) ) ) ) == 0)) { SOURCE(19878, 6) return; }; SOURCE(19886, 29) { word pd145; pd145 = (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+10) ); tSel_v11408 = (word) ( *( (fPt) ((* (ptr) pd145 ))))(pd145); }; SOURCE(19917, 60) { word pd146; pd146 = (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+12) ); (void) ( *( (fPt) ((* (ptr) pd146 ))))((* (ptr) (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+4) ) ), tSel_v11408, pd146) ; }; SOURCE(19979, 934) { word var_c36612; var_c36612 = (* (( (ptr) tSel_v11408)+22) ); switch (var_c36612) { case 0: SOURCE(20019, 23) (* (( (ptr) tSel_v11408)+22) ) = 1; break; case 1: SOURCE(20055, 168) { word start_v11452; word end_v11480; SOURCE(20074, 23) (* (( (ptr) tSel_v11408)+22) ) = 2; SOURCE(20099, 49) { W3 var_c36644; (void) ExpandToWord_P780((word) &var_c36644, (* (W2Pt) (( (ptr) tSel_v11408)+2) ), 0); end_v11480 = var_c36644.f1; start_v11452 = var_c36644.f0; }; SOURCE(20150, 28) (* (( (ptr) tSel_v11408)+3) ) = start_v11452; SOURCE(20180, 41) (* (( (ptr) tSel_v11408)+11) ) = (* (( (ptr) tSel_v11408)+2) ); (* (( (ptr) tSel_v11408)+12) ) = end_v11480; }; break; case 2: SOURCE(20236, 24) (* (( (ptr) tSel_v11408)+3) ) = 0; SOURCE(20262, 55) { word pd147; pd147 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+36) ); (* (( (ptr) tSel_v11408)+12) ) = (word) ( *( (fPt) ((* (ptr) pd147 ))))((* ((( (ptr) tSel_v11408)+11)) ), pd147); }; SOURCE(20319, 128) { word var_c36708; { word tc148; word pd149; if (((* (( (ptr) tSel_v11408)+2) ) == (* (( (ptr) tSel_v11408)+11) ))) { pd149 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+28) ); tc148 = (word) ((word) ( *( (fPt) ((* (ptr) pd149 ))))((* ((( (ptr) tSel_v11408)+11)) ), pd149) == 0); } else { tc148 = (word) 0; }; if (tc148) { var_c36708 = 4; } else { var_c36708 = 3; }; }; (* (( (ptr) tSel_v11408)+22) ) = var_c36708; }; break; case 3: SOURCE(20462, 25) (* (( (ptr) tSel_v11408)+22) ) = 4; SOURCE(20489, 58) { word pd150; pd150 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+26) ); (* (( (ptr) tSel_v11408)+11) ) = (word) ( *( (fPt) ((* (ptr) pd150 ))))((* ((( (ptr) tSel_v11408)+11)) ), pd150); }; SOURCE(20549, 55) { word pd151; pd151 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+36) ); (* (( (ptr) tSel_v11408)+12) ) = (word) ( *( (fPt) ((* (ptr) pd151 ))))((* ((( (ptr) tSel_v11408)+11)) ), pd151); }; break; case 4: SOURCE(20619, 296) { word parent_v11524; SOURCE(20621, 59) { word pd152; pd152 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+8) ); parent_v11524 = (word) ( *( (fPt) ((* (ptr) pd152 ))))((* ((( (ptr) tSel_v11408)+2)) ), pd152); }; SOURCE(20682, 94) { word pd153; pd153 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+8) ); if (((word) ( *( (fPt) ((* (ptr) pd153 ))))(parent_v11524, pd153) == 0)) { SOURCE(20735, 31) { word pd154; pd154 = (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+48) ); (void) ( *( (fPt) ((* (ptr) pd154 ))))(pd154); }; SOURCE(20768, 8) return; }; }; SOURCE(20779, 28) (* (( (ptr) tSel_v11408)+2) ) = parent_v11524; (* (( (ptr) tSel_v11408)+3) ) = 0; SOURCE(20809, 47) { word pd155; pd155 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+26) ); (* (( (ptr) tSel_v11408)+11) ) = (word) ( *( (fPt) ((* (ptr) pd155 ))))(parent_v11524, pd155); }; SOURCE(20858, 55) { word pd156; pd156 = (* (( (ptr) (* (( (ptr) gf_c38276)+79)/* var_c34212 */ ))+36) ); (* (( (ptr) tSel_v11408)+12) ) = (word) ( *( (fPt) ((* (ptr) pd156 ))))((* ((( (ptr) tSel_v11408)+11)) ), pd156); }; }; break; default: SOURCE(20929, 5) (void) XR_RaiseUnnamedError(); break; }; }; SOURCE(20936, 39) { word pd157; pd157 = (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+25) ); (void) ( *( (fPt) ((* (ptr) pd157 ))))(tSel_v11408, 0, 0, 0, 1, pd157); }; SOURCE(20977, 27) { word pd158; pd158 = (* (( (ptr) (* (( (ptr) gf_c38276)+75)/* var_c33540 */ ))+11) ); (void) ( *( (fPt) ((* (ptr) pd158 ))))(tSel_v11408, pd158); }; } static void InsertionPoint_P1140(formal_c0342, s_v7580) word formal_c0342; word s_v7580; { register ptr gf_c38308 = (ptr) &globalframe; W2 ip_v7624; word nodeSel_v11568; word viewer_v11596; /* InsertionPoint: */ SOURCE(21008, 813) SOURCE(21008, 813) ip_v7624.f0 = 0; ip_v7624.f1 = 0; SOURCE(21123, 65) nodeSel_v11568 = ( ((* (( (ptr) s_v7580)+22) ) == 3) ? 1 : ((* (( (ptr) s_v7580)+22) ) == 4) ) ; SOURCE(21190, 39) viewer_v11596 = (* (ptr) s_v7580 ); SOURCE(21231, 62) if ((viewer_v11596 == 0) || ((* (( (ptr) s_v7580)+1) ) != (* (( (ptr) viewer_v11596)+26) ))) { SOURCE(21276, 17) ip_v7624.f0 = 0; ip_v7624.f1 = 0; goto lab_L100043; }; SOURCE(21328, 493) if ( ( (0 != nodeSel_v11568) ? ((* (( (ptr) s_v7580)+2) ) == 0) : 0 ) ) { SOURCE(21369, 288) { word place_v11640; word node_v11668; SOURCE(21371, 68) place_v11640 = ( ((* (( (ptr) s_v7580)+24) ) == 0) ? 0 : 1 ) ; SOURCE(21441, 80) node_v11668 = ( (place_v11640 == 0) ? (* (( (ptr) s_v7580)+2) ) : (* (( (ptr) s_v7580)+11) ) ) ; SOURCE(21523, 132) { word var_c36772; { word pd159; pd159 = (* (( (ptr) (* (( (ptr) gf_c38308)+79)/* var_c34212 */ ))+9) ); var_c36772 = (word) ( *( (fPt) ((* (ptr) pd159 ))))(node_v11668, pd159); }; { word pd160; pd160 = (* (( (ptr) (* (( (ptr) gf_c38308)+80)/* var_c34468 */ ))+15) ); ip_v7624.f0 = (word) ( *( (fPt) ((* (ptr) pd160 ))))(var_c36772, node_v11668, place_v11640, 1, (* (ptr) (* (( (ptr) (* ( ( (ptr) gf_c38308)+86)/* var_c36804 */ ))+6) ) ), pd160); }; }; ip_v7624.f1 = 0; }; } else { SOURCE(21666, 155) if (((* (( (ptr) s_v7580)+24) ) == 0)) { SOURCE(21694, 16) ip_v7624 = (* (W2Pt) (( (ptr) s_v7580)+2) ); } else { SOURCE(21717, 106) { word size_v11712; SOURCE(21719, 41) { word pd161; pd161 = (* (( (ptr) (* (( (ptr) gf_c38308)+78)/* var_c33828 */ ))+6) ); size_v11712 = (word) ( *( (fPt) ((* (ptr) pd161 ))))((* ((( (ptr) s_v7580)+11)) ), pd161); }; SOURCE(21762, 59) ip_v7624.f0 = (* (( (ptr) s_v7580)+11) ); { word x162; word x163; ip_v7624.f1 = (x163 = (x162 = ((* (( (ptr) s_v7580)+12) ) + 1), MAX((int)(word), x162, 0)), MIN((int)(word), x163, size_v11712)); }; }; }; }; /* removed tail goto */ lab_L100043: ; (* (W2Pt) formal_c0342 ) = ip_v7624; return; } static word GetSelectionGrain_P1200(sel_v7684) word sel_v7684; { word var_c7728; /* GetSelectionGrain: */ SOURCE(21833, 311) SOURCE(21938, 72) if (((* (( (ptr) sel_v7684)+22) ) == 3) || ((* (( (ptr) sel_v7684)+22) ) == 4)) { SOURCE(21997, 13) return(3); }; SOURCE(22012, 78) if ( ( ((* (( (ptr) sel_v7684)+22) ) == 0) ? XR_EqualWords((( (ptr) sel_v7684)+2), (( (ptr) sel_v7684)+11), 2) : 0 ) ) { SOURCE(22076, 14) return(0); }; SOURCE(22092, 52) if (((* (( (ptr) sel_v7684)+22) ) == 2)) { return(2); } else { return(1); }; } static void InvalidateLineCache_P1260() { register ptr gf_c38340 = (ptr) &globalframe; /* InvalidateLineCache: */ SOURCE(22278, 64) (void) (XR_MonitorEntry((word) (( (bPt) gf_c38340)+16)/* LOCK_v3504 */ )); SOURCE(22321, 21) (* (( (ptr) gf_c38340)+14)/* lineInfoViewer_v4204 */ ) = 0; SOURCE(22278, 64) (void) (XR_MonitorExit((word) (( (bPt) gf_c38340)+16)/* LOCK_v3504 */ )); return; } static void GetLine_P1320(viewer_v7804, line_v7832) word viewer_v7804; word line_v7832; { register ptr gf_c38372 = (ptr) &globalframe; /* GetLine: */ SOURCE(22345, 708) SOURCE(22418, 635) { word var_c36836; var_c36836 = (* (( (ptr) viewer_v7804)+26) ); if ((var_c36836 == 0)) { goto lab_L100044; }; if (((* (( (ptr) gf_c38372)+22) ) == XR_GetReferentType(var_c36836))) { { word tdd_v11756; tdd_v11756 = var_c36836; SOURCE(22487, 571) { word lines_v11800; SOURCE(22489, 46) lines_v11800 = (* (( (ptr) tdd_v11756)+1) ); SOURCE(22537, 516) if ((viewer_v7804 != (* (( (ptr) gf_c38372)+14)/* lineInfoViewer_v4204 */ )) || ( (int)line_v7832 != (int)(* (( (ptr) gf_c38372)+15) /* lineInfoLine_v4232 */ ))) { SOURCE(22588, 467) { word style_v11844; W2 pos_v11872; word kind_v11900; SOURCE(22590, 43) { word pd164; pd164 = (* (( (ptr) (* (( (ptr) gf_c38372)+87)/* var_c36868 */ ))+6) ); style_v11844 = (word) ( *( (fPt) ((* (ptr) pd164 ))))(pd164); }; SOURCE(22635, 40) { word limit165; pos_v11872 = (* (W2Pt) (( (W9Pt) (( (ptr) lines_v11800)+3))+( /*1*/ limit165 = (* (( (ptr) lines_v11800)+2) ), /*1*/ BCK(line_v7832, limit165) /*1*/ )) ); }; SOURCE(22677, 103) { word tc166; word pd167; pd167 = (* (( (ptr) (* (( (ptr) gf_c38372)+88)/* var_c36900 */ ))+29) ); if (((word) ( *( (fPt) ((* (ptr) pd167 ))))(viewer_v7804, (* (( (ptr) gf_c38372)+25) ), pd167) == (* (( (ptr) gf_c38372)+27) ))) { tc166 = (word) 1; } else { tc166 = (word) 0; }; kind_v11900 = tc166; }; SOURCE(22782, 56) { word pd168; word limit169; pd168 = (* (( (ptr) (* (( (ptr) gf_c38372)+87)/* var_c36868 */ ))+15) ); (void) ( *( (fPt) ((* (ptr) pd168 ))))(style_v11844, (* (ptr) (( (W9Pt) (( (ptr) lines_v11800)+3))+( /*1*/ limit169 = (* (( (ptr) lines_v11800)+2) ), /*1*/ BCK(line_v7832, limit169) /*1*/ )) ), kind_v11900, pd168); }; SOURCE(22840, 141) { word var_c36932; { word var_c36964; word int_v31552; int_v31552 = (* (( (ptr) viewer_v7804)+7) ); var_c36964 = (int_v31552 << 16); var_c36932 = var_c36964; }; { word pd170; pd170 = (* (( (ptr) (* (( (ptr) gf_c38372)+74)/* var_c33444 */ ))+5) ); (void) ( *( (fPt) ((* (ptr) pd170 ))))((* (( (ptr) gf_c38372)+16)/* lineInfo_v4260 */ ), pos_v11872.f0, pos_v11872.f1, style_v11844, var_c36932, 0, pd170) ; }; }; SOURCE(22983, 23) (* (( (ptr) gf_c38372)+14)/* lineInfoViewer_v4204 */ ) = viewer_v7804; SOURCE(23008, 19) (* (( (ptr) gf_c38372)+15)/* lineInfoLine_v4232 */ ) = line_v7832; SOURCE(23029, 24) { word pd171; pd171 = (* (( (ptr) (* (( (ptr) gf_c38372)+87)/* var_c36868 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd171 ))))(style_v11844, pd171); }; }; }; }; }; } else { lab_L100044: ; }; }; } static void CharPositionInCachedLine_P1380(formal_c0363, viewer_v7892, line_v7920, pos_v7948) word formal_c0363; word viewer_v7892; word line_v7920; W2 pos_v7948; { register ptr gf_c38404 = (ptr) &globalframe; word x_v7992; word width_v8020; /* CharPositionInCachedLine: */ SOURCE(23082, 227) (void) (XR_MonitorEntry((word) (( (bPt) gf_c38404)+16)/* LOCK_v3504 */ )); SOURCE(23228, 21) (void) GetLine_P1320(viewer_v7892, line_v7920); SOURCE(23251, 58) { W2 var_c37028; { word pd172; pd172 = (* (( (ptr) (* (( (ptr) gf_c38404)+74)/* var_c33444 */ ))+8) ); (void) ( *( (fPt) ((* (ptr) pd172 ))))((word) &var_c37028, (* (( (ptr) gf_c38404)+16)/* lineInfo_v4260 */ ), pos_v7948.f1, pd172) ; }; width_v8020 = var_c37028.f1; x_v7992 = var_c37028.f0; }; /* removed tail goto */ (void) (XR_MonitorExit((word) (( (bPt) gf_c38404)+16)/* LOCK_v3504 */ )); (* (ptr) formal_c0363 ) = x_v7992; (* (( (ptr) formal_c0363)+1) ) = width_v8020; return; } static void NoName_Q4824(formal_c0368, formal_c200004, formal_c200005, formal_c200006, formal_c200007) word formal_c0368; word formal_c200004; word formal_c200005; word formal_c200006; word formal_c200007; { register ptr gf_c0409 = (ptr) &globalframe; if ((formal_c200005 == XR_Unwind)) { SOURCE(2622, 37) { word pd173; pd173 = (* (( (ptr) (* (( (ptr) gf_c0409)+77)/* var_c33668 */ ))+9) ); (void) ( *( (fPt) ((* (ptr) pd173 ))))((* ((( (ptr) (* (ptr) formal_c200004 ))+6)) ), pd173); }; }; (* (ptr) formal_c0368 ) = 0; (* (( (ptr) formal_c0368)+1) ) = 0; return; } static void NoName_Q4884(formal_c0373, formal_c200000, formal_c200001, formal_c200002, formal_c200003) word formal_c0373; word formal_c200000; word formal_c200001; word formal_c200002; word formal_c200003; { register ptr gf_c0410 = (ptr) &globalframe; if ((formal_c200001 == XR_Unwind)) { SOURCE(2825, 30) { word pd174; pd174 = (* (( (ptr) (* (( (ptr) gf_c0410)+75)/* var_c33540 */ ))+22) ); (void) ( *( (fPt) ((* (ptr) pd174 ))))((* ((( (ptr) formal_c200000)+9)) ), pd174); }; }; (* (ptr) formal_c0373 ) = 0; (* (( (ptr) formal_c0373)+1) ) = 0; return; } /* file: TEditMouseImpl, module: TEditMouseImpl, compiled at: February 28, 1992 10:40:02 am PST */ extern void XR_install_TEditMouseImpl() { NoName_Q4644(); } extern void XR_run_TEditMouseImpl() { XR_Start(&globalframe); }