/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1992 by Xerox Corporation. All rights reserved. */ /* time: April 21, 1992 12:55:40 pm PDT */ /* C2C version: October 16, 1990 (native) */ /* ref-counting: off */ /* file: XTkNumberLabelImpl, module: XTkNumberLabelImpl */ /* switches: bcfhklnouw */ #include <cedar/InstallationSupport.h> #include <cedar/CedarExtra.h> static char versionStamp[] = "@(#)mob←version [442397872,1666427734] XTkNumberLabelImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef word (*fPt)(); typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {W8 f; W8 r;} W16; typedef struct {W8 f; word r;} W9; typedef struct {W16 f; W9 r;} W25; typedef struct {word f0, f1, f2, f3;} W4; typedef struct {word f0, f1;} W2; typedef struct {word f0, f1, f2, f3, f4, f5, f6;} W7; typedef struct {word f0, f1, f2, f3, f4, f5;} W6; typedef W9 *W9Pt; typedef W4 *W4Pt; typedef struct {word f0, f1, f2, f3, f4;} W5; typedef W2 *W2Pt; typedef W5 *W5Pt; #define SOURCE(p, l) /* source p, l */ #define BCK(idx, lim) ( ((unsigned) idx) >= ((unsigned) lim) ? (XR←RaiseBoundsFault()) : (idx) ) #define SGNCK(i) ((int) (word) (i) < 0 ? XR←RaiseArithmeticFault(): i ) #define IOP2(op, x, y) ( (word) ((x) op (y)) ) #define MAX(cast, x, y) ( ( cast x) > ( cast y) ? (x) : (y) ) static void NoName←Q2028(); static void XTkNumberLabelImpl←P0(); static word MakeClass←P60(); static void NumberInitInstPart←P180(); static void EventProc←P240(); static word NoName←Q2088(); static word NoName←Q2148(); static void Beep←P888(); static void Redisplay←P300(); static word ValToText←P1236(); static word IsNumberLabel←P360(); static word Create←P420(); static word GetVal←P480(); static void SetFilter←P540(); static void SetVal←P600(); static void InternalSetVal←P660(); static void SetEditable←P720(); static void NumberPreferredSize←P780(); static void NoName←Q2208(); static void NoName←Q2268(); static struct {unsigned f; char r[4];} string1 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string2 = {65537, "\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {851984, "\257\300\032\136\164\260\300\143\123\253\126\100\244\000\000"}; static struct {unsigned f; char r[4];} string4 = {131074, "\003\001\000"}; static struct {unsigned f; char r[44];} string5 = {2752556, "\260\006\005\146\151\162\163\164\257\300\233\221\325\046\300\135\160\307\206\100\200\005\004\162\145\163\164\214\257\300\233\221\325\046\300\135\160\307\206\100\200\261\000"}; static struct {unsigned f; char r[16];} string6 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"}; static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\072\360\043\311\300\372\054\163\300\100\164\000\000"}; static struct {unsigned f; char r[16];} string8 = {851984, "\257\300\032\136\164\260\300\143\123\253\126\100\230\000\000"}; static struct {unsigned f; char r[4];} string9 = {131074, "\003\002\000"}; static struct {unsigned f; char r[16];} string10 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\244\000\000"}; static struct {unsigned f; char r[40];} string11 = {2555943, "\011\000\004\106\000\040\006\011\020\004\101\201\100\174\001\100\200\001\100\204\001\100\210\001\100\220\001\100\264\001\100\270\001\100\274\001\100\304\001"}; static struct {unsigned f; char r[8];} string12 = {393224, "Number\000"}; static struct {unsigned f; char r[4];} string13 = {196612, "%5d"}; static struct {unsigned f; char r[24];} string14 = {1376280, "XTkNumberLabelChanged\000\000"}; static struct {unsigned f; char r[16];} string15 = {851984, "\257\300\032\136\164\260\300\143\123\253\126\100\164\000\000"}; static struct {unsigned f; char r[16];} string16 = {917518, "\006\005\040\001\044\001\050\001\054\001\100\130\004\007\000"}; static struct {unsigned f; char r[16];} string17 = {851984, "\257\300\255\053\300\023\300\142\135\315\105\100\150\000\000"}; static struct {unsigned f; char r[16];} string18 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"}; static struct {unsigned f; char r[16];} string19 = {851984, "\257\300\351\276\264\273\300\115\104\320\264\100\164\000\000"}; static struct {unsigned f; char r[16];} string20 = {851984, "\257\300\072\360\036\365\300\334\030\146\334\100\150\000\000"}; static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\130\354\167\377\300\226\325\031\150\100\150\000\000"}; static struct {unsigned f; char r[16];} string22 = {851984, "\257\300\033\115\307\000\300\214\060\055\310\100\150\000\000"}; static struct {unsigned f; char r[16];} string23 = {851984, "\257\300\234\350\054\033\300\120\345\145\367\100\150\000\000"}; static struct {unsigned f; char r[12];} string24 = {1481927502, "umberLabel"}; static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\005\226\257\270\300\167\362\171\040\100\150\000\000"}; static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\227\370\144\253\300\176\165\034\110\100\150\000\000"}; static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\241\212\365\147\300\210\002\141\100\100\150\000\000"}; static struct { word f0[25]; word f25; word f26; word f27; word f28; word f29; word f30; word f31; word f32; word f33; word f34; word f35; word f36; word f37; word f38; word f39; word f40; word f41; word f42; word f43; word f44; word f45; word f46; word f47; word f48; word f49; word f50[12]; } globalframe = { {0}, (word) NumberPreferredSize←P780, 0, (word) SetEditable←P720, 0, (word) InternalSetVal←P660, 0, (word) SetVal←P600, 0, (word) SetFilter←P540, 0, (word) GetVal←P480, 0, (word) Create←P420, 0, (word) IsNumberLabel←P360, 0, (word) Redisplay←P300, 0, (word) EventProc←P240, 0, (word) NumberInitInstPart←P180, 0, (word) MakeClass←P60, 0, (word) XTkNumberLabelImpl←P0, {0} }; static void NoName←Q2028() { register ptr gf←c0147 = (ptr) &globalframe; word var←c29932; (* (( (ptr) gf←c0147)+12) ) = (word) XR←GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf←c0147)+13) ) = (word) XR←GetTypeIndex((word) &string3, 0, (word) &string4); (* (( (ptr) gf←c0147)+15) ) = (word) XR←GetTypeIndex((word) &string5, 0, (word) &string4); (* (( (ptr) gf←c0147)+17) ) = (word) XR←GetTypeIndex((word) &string6, 0, (word) &string2); (* (( (ptr) gf←c0147)+18) ) = (word) XR←GetTypeIndexS((word) (&string7)); (* (( (ptr) gf←c0147)+19) ) = (word) XR←GetTypeIndex((word) &string8, 0, (word) &string9); (* (( (ptr) gf←c0147)+20) ) = (word) XR←GetTypeIndex((word) &string10, 0, (word) &string11); (* (ptr) (( (bPt) gf←c0147)+88) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0147)+12) ), (word) &string12); (* (ptr) (( (bPt) gf←c0147)+92) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0147)+17) ), (word) &string13); (* (ptr) (( (bPt) gf←c0147)+96) ) = (word) XR←GetRefLiteral((* (( (ptr) gf←c0147)+12) ), (word) &string14); (void) XR←DeclareGlobalFrame((word) "XTkNumberLabelImpl", &globalframe, (word) XR←GetTypeIndex((word) &string15, 0, (word) &string16) , (word) (( (bPt) gf←c0147)+196)/* var←c28716 */ ); var←c29932 = (word) XR←ImportInterface((word) "Convert", (word) XR←GetTypeIndexS((word) (&string17)), 73); (* (( (ptr) gf←c0147)+57)/* var←c29324 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 67634690); var←c29932 = (word) XR←ImportInterface((word) "IO", (word) XR←GetTypeIndexS((word) (&string18)), 103); (* (( (ptr) gf←c0147)+59)/* var←c29548 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 67910402); var←c29932 = (word) XR←ImportInterface((word) "Xl", (word) XR←GetTypeIndexS((word) (&string19)), 218); (* (( (ptr) gf←c0147)+51)/* var←c28748 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 819203); (void) XR←ImportProcS(var←c29932, 67910403); (void) XR←ImportProcS(var←c29932, 68207876); var←c29932 = (word) XR←ImportInterface((word) "XlAscii", (word) XR←GetTypeIndexS((word) (&string20)), 3); (* (( (ptr) gf←c0147)+55)/* var←c29228 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 269484036); var←c29932 = (word) XR←ImportInterface((word) "XlCutBuffers", (word) XR←GetTypeIndexS((word) (&string21)), 2); (* (( (ptr) gf←c0147)+56)/* var←c29292 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 67633154); var←c29932 = (word) XR←ImportInterface((word) "XTk", (word) XR←GetTypeIndexS((word) (&string22)), 50); (* (( (ptr) gf←c0147)+54)/* var←c29004 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 1050628); (void) XR←ImportProcS(var←c29932, 67642370); (void) XR←ImportProcS(var←c29932, 1579523); (void) XR←ImportProcS(var←c29932, 787459); var←c29932 = (word) XR←ImportInterface((word) "XTkLabels", (word) XR←GetTypeIndexS((word) (&string23)), 9); (* (( (ptr) gf←c0147)+52)/* var←c28940 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 70778883); (void) XR←ImportProcS(var←c29932, 787203); var←c29932 = (word) XR←ImportInterface((word) &string24, (word) XR←GetTypeIndexS((word) (&string25)), 8); (* (( (ptr) gf←c0147)+60)/* var←c29676 */ ) = var←c29932; var←c29932 = (word) XR←ImportInterface((word) "XTkFriends", (word) XR←GetTypeIndexS((word) (&string26)), 33); (* (( (ptr) gf←c0147)+53)/* var←c28972 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 1048580); (void) XR←ImportProcS(var←c29932, 67637250); (void) XR←ImportProcS(var←c29932, 73666049); var←c29932 = (word) XR←ImportInterface((word) "XTkInputFocus", (word) XR←GetTypeIndexS((word) (&string27)), 7); (* (( (ptr) gf←c0147)+58)/* var←c29388 */ ) = var←c29932; (void) XR←ImportProcS(var←c29932, 524546); (void) XR←ImportProcS(var←c29932, 67633922); (void) XR←ImportProcS(var←c29932, 524290); var←c29932 = (word) XR←ExportInterface((word) &string24, (word) XR←GetTypeIndexS((word) (&string25)), 8); (* (( (ptr) gf←c0147)+61)/* var←c29964 */ ) = var←c29932; (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+156)/* var←c28556 */ , 67371009); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+148)/* var←c28524 */ , 71565574); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+140)/* var←c28492 */ , 67371521); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+124)/* var←c28428 */ , 787203); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+132)/* var←c28460 */ , 787459); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+116)/* var←c28396 */ , 787715); (void) XR←ExportProcS(var←c29932, (word) (( (bPt) gf←c0147)+108)/* var←c28364 */ , 525826); (void) XR←ExportVar(var←c29932, 7, (word) (( (bPt) gf←c0147)+32)/* valueChangedKey←v3308 */ ); } static void XTkNumberLabelImpl←P0(formal←c040, formal←c037) word formal←c040; word formal←c037; { register ptr gf←c29996 = (ptr) &globalframe; /* XTkNumberLabelImpl: */ SOURCE(191, 5811) SOURCE(517, 52) (* (( (ptr) gf←c29996)+8)/* valueChangedKey←v3308 */ ) = (* (( (ptr) gf←c29996)+24) ); SOURCE(617, 68) { word pd28; pd28 = (* (( (ptr) (* (( (ptr) gf←c29996)+51)/* var←c28748 */ ))+201) ); (* (( (ptr) gf←c29996)+9)/* events←v3364 */ ) = (word) ( *( (fPt) ((* (ptr) pd28 ))))(2, 4, 35, 35, pd28); }; SOURCE(687, 16) { word var←c28780; word var←c28812; var←c28780 = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = var←c28780; (* (ptr) var←c28812 ) = 268828532; (* (( (ptr) var←c28812)+1) ) = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = (* (( (ptr) var←c28812)+1) ); (* (ptr) var←c28812 ) = 268762884; (* (( (ptr) var←c28812)+1) ) = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = (* (( (ptr) var←c28812)+1) ); (* (ptr) var←c28812 ) = 268500740; (* (( (ptr) var←c28812)+1) ) = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = (* (( (ptr) var←c28812)+1) ); (* (ptr) var←c28812 ) = 65385; (* (( (ptr) var←c28812)+1) ) = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = (* (( (ptr) var←c28812)+1) ); (* (ptr) var←c28812 ) = 65366; (* (( (ptr) var←c28812)+1) ) = XR←NewObject(8, (* (( (ptr) gf←c29996)+15) )); var←c28812 = (* (( (ptr) var←c28812)+1) ); (* (ptr) var←c28812 ) = 65363; (* (( (ptr) gf←c29996)+10)/* listOfSpecials←v3392 */ ) = var←c28780; }; SOURCE(836, 36) (* (( (ptr) gf←c29996)+11)/* numberClass←v3420 */ ) = (word) MakeClass←P60(); } static word MakeClass←P60() { register ptr gf←c30028 = (ptr) &globalframe; word c←v4048; /* MakeClass: */ SOURCE(874, 1771) SOURCE(874, 1771) c←v4048 = 0; SOURCE(931, 1714) { word var←c28844; { word var←c28876; var←c28876 = XR←NewObject(4, (* (( (ptr) gf←c30028)+18) )); (* (ptr) var←c28876 ) = 22; var←c28844 = var←c28876; }; { W25 var←c045; (* (ptr) &var←c045 ) = (* (( (ptr) gf←c30028)+22) ); (* (( (ptr) &var←c045)+1) ) = 0; (* (( (ptr) &var←c045)+2) ) = (* (ptr) (* (( (ptr) (* (( (ptr) gf←c30028)+52)/* var←c28940 */ ))+10) ) ); (* (( (ptr) &var←c045)+3) ) = 1; (* (( (ptr) &var←c045)+4) ) = 0; (* (( (ptr) &var←c045)+5) ) = 0; (* (( (ptr) &var←c045)+6) ) = (word) (( (bPt) gf←c30028)+100)/* var←c28332 */ ; (* (( (ptr) &var←c045)+7) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+8) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+9) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+10) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+11) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+12) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+13) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+14) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+15) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+16) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+17) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+18) ) = (word) (( (bPt) gf←c30028)+180)/* var←c28652 */ ; (* (( (ptr) &var←c045)+19) ) = var←c28844; (* (( (ptr) &var←c045)+20) ) = 0; (* (( (ptr) &var←c045)+21) ) = 0; (* (( (ptr) &var←c045)+22) ) = 0; (* (( (ptr) &var←c045)+23) ) = XR←CheckProc(0); (* (( (ptr) &var←c045)+24) ) = XR←CheckProc(0); { word pd29; pd29 = (* (( (ptr) (* (( (ptr) gf←c30028)+53)/* var←c28972 */ ))+18) ); c←v4048 = (word) ( *( (fPt) ((* (ptr) pd29 ))))((word) (&var←c045), pd29); }; }; }; SOURCE(1168, 41) { word pd30; pd30 = (* (( (ptr) (* (( (ptr) gf←c30028)+54)/* var←c29004 */ ))+8) ); (void) ( *( (fPt) ((* (ptr) pd30 ))))(c←v4048, 1, 1, pd30); }; SOURCE(874, 1771) return(c←v4048); } static void NumberInitInstPart←P180(widget←v9952, arguments←v9980) word widget←v9952; word arguments←v9980; { register ptr gf←c30060 = (ptr) &globalframe; word numberData←v5300; /* NumberInitInstPart: */ SOURCE(1567, 1078) SOURCE(1616, 43) numberData←v5300 = XR←NewObject(12, (* (( (ptr) gf←c30060)+19) )); (* (ptr) numberData←v5300 ) = (word) -1; SOURCE(1661, 58) { word val←v28284; val←v28284 = numberData←v5300; { word idx31; word limit32; (* ((( (ptr) widget←v9952)+49)+( idx31 = (* (( (ptr) (* (( (ptr) gf←c30060)+11)/* numberClass←v3420 */ ))+4) ), limit32 = (* (( (ptr) widget←v9952)+48) ), BCK(idx31, limit32) )) ) = val←v28284; }; }; SOURCE(1721, 924) { word var←c29068; { word pd33; pd33 = (* (( (ptr) (* (( (ptr) gf←c30060)+51)/* var←c28748 */ ))+63) ); var←c29068 = (word) ( *( (fPt) ((* (ptr) pd33 ))))(0, 0, 0, pd33); }; { W4 var←c29100; var←c29100.f0 = (word) (( (bPt) gf←c30060)+172)/* var←c28620 */ ; var←c29100.f1 = (* (( (ptr) gf←c30060)+9)/* events←v3364 */ ); var←c29100.f2 = var←c29068; var←c29100.f3 = widget←v9952; { word pd34; pd34 = (* (( (ptr) (* (( (ptr) gf←c30060)+54)/* var←c29004 */ ))+30) ); (void) ( *( (fPt) ((* (ptr) pd34 ))))(widget←v9952, var←c29100, 5, pd34); }; }; }; } static void EventProc←P240(formal←c0177, formal←c0178, tq←v10096) word formal←c0177; word formal←c0178; word tq←v10096; { W8 var←c30092; /* declaration of event←v10040 skipped */ /* declaration of clientData←v10068 skipped */ /* declaration of var←c29132 skipped */ var←c30092.f4/* event←v10040 */ = formal←c0177; var←c30092.f5/* clientData←v10068 */ = formal←c0178; /* EventProc: */ SOURCE(1862, 1609) { word tmpAddr35; tmpAddr35 = (word) (( (ptr) &var←c30092)+6)/* var←c29132 */ ; (* (ptr) tmpAddr35 ) = ( ((word) (fPt) Beep←P888) ); (* (( (ptr) tmpAddr35) + 1) ) = 1; }; SOURCE(1892, 1579) SOURCE(1894, 1539) { word var←c04; { word var←c0168; var←c0168 = (word) &var←c30092; var←c04 = (word) XR←Enable(( ((word) (fPt) NoName←Q2088) ), ( ((word) (fPt) NoName←Q2208) ), var←c0168); }; if ((var←c04 == 2)) { goto lab←L100000; } else { if ((var←c04 == 1)) { goto lab←L02; }; }; }; goto lab←L100007; lab←L100000: ; lab←L100007: ; lab←L02: ; return; } static word NoName←Q2088(formal←c0152) word formal←c0152; { W7 var←c0174; register ptr gf←c0151 = (ptr) &globalframe; var←c0174.f0 = formal←c0152; SOURCE(1930, 16) { word widget←v5372; word numberData←v5400; SOURCE(1983, 39) widget←v5372 = XR←Narrow((* (( (ptr) formal←c0152)+5) ), (* (( (ptr) gf←c0151)+20) )); SOURCE(2024, 46) { word numberData←v28160; SOURCE(1415, 1230) numberData←v28160 = 0; SOURCE(1500, 1145) { word idx36; word limit37; numberData←v28160 = XR←Narrow((* ((( (ptr) widget←v5372)+49)+( idx36 = (* (( (ptr) (* (( (ptr) gf←c0151)+11)/* numberClass←v3420 */ ))+4) ), limit37 = (* (( (ptr) widget←v5372)+48) ), BCK(idx36, limit37) )) ), (* (( (ptr) gf←c0151)+19) )); }; SOURCE(1415, 1230) numberData←v5400 = numberData←v28160; }; SOURCE(2072, 45) if ((0 == (* (( (ptr) numberData←v5400)+1) ))) { SOURCE(2103, 6) (void) Beep←P888((word) ((( (bPt) formal←c0152)+24))); SOURCE(2111, 6) return(1); }; SOURCE(2122, 1311) { word var←c29196; var←c29196 = (* (( (ptr) formal←c0152)+4) ); if ((var←c29196 == 0)) { goto lab←L100004; }; { word var←c29420; var←c29420 = (* (( (ptr) var←c29196)+4) ); if ((var←c29420 == 2)) { { word keyPress←v5460; keyPress←v5460 = var←c29196; SOURCE(2175, 1164) { word char←v5504; word keysym←v5532; word matched←v5560; word isModifier←v5588; SOURCE(2246, 399) { W4 var←c29260; { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf←c0151)+55)/* var←c29228 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd38 ))))((word) &var←c29260, (* (( (ptr) (* (( (ptr) formal←c0152)+4) ))+2) ), (* (( (ptr) keyPress←v5460)+5) /*1*/ ), (* (( (ptr) keyPress←v5460)+15) ), (* (( (ptr) gf←c0151)+10)/* listOfSpecials←v3392 */ ), pd38); }; isModifier←v5588 = var←c29260.f3; matched←v5560 = var←c29260.f2; keysym←v5532 = var←c29260.f1; char←v5504 = var←c29260.f0; }; SOURCE(2404, 25) if ((0 != isModifier←v5588)) { SOURCE(2423, 6) return(1); }; SOURCE(2431, 291) switch (matched←v5560) { case 268828532: case 268762884: case 268500740: SOURCE(2525, 197) { /*1*/ /* declaration of sel←v5632 skipped */ /*1*/ word val←v5660; SOURCE(2527, 52) /*1*/ { /*1*/ word pd39; /*1*/ pd39 = (* (( (ptr) (* (( (ptr) gf←c0151)+56)/* var←c29292 */ ))+4) ); /*1*/ var←c0174.f4/* sel←v5632 */ = (word) ( *( (fPt) ((* (ptr) pd39 ))))((* (( (ptr) widget←v5372)+34) ), 0, pd39); /*1*/ }; SOURCE(2581, 57) /*1*/ { /*1*/ /* declaration of var←c01 skipped */ /*1*/ var←c0174.f5/* var←c01 */ = (* (( (ptr) (* (( (ptr) gf←c0151)+57)/* var←c29324 */ ))+10) ); /*1*/ { /*1*/ /* declaration of var←c02 skipped */ /*1*/ { /*1*/ word var←c03; /*1*/ { /*1*/ word var←c0169; /*1*/ var←c0169 = (word) &var←c0174; /*1*/ var←c03 = (word) XR←Enable(( ((word) (fPt) NoName←Q2148) ), ( ((word) (fPt) NoName←Q2268) ), var←c0169); /*1*/ }; /*1*/ if ((var←c03 == 2)) { /*1*/ return(2); /*1*/ } /*1*/ else { /*1*/ if ((var←c03 == 1)) { /*1*/ return(1); /*1*/ }; /*1*/ }; /*1*/ }; /*1*/ val←v5660 = var←c0174.f6/* var←c02 */ ; /*1*/ }; /*1*/ }; SOURCE(2660, 53) /*1*/ if (( (int)val←v5660 >= (int)0)) { SOURCE(2694, 19) /*1*/ (void) SetVal←P600(widget←v5372, SGNCK(val←v5660), 0); /*1*/ }; SOURCE(2715, 7) /*1*/ return(1); /*1*/ }; }; SOURCE(2725, 137) if ((matched←v5560 == 65366) || (matched←v5560 == 65363)) { SOURCE(2793, 61) { word var←c29356; { /*1*/ word pd40; /*1*/ pd40 = (* (( (ptr) (* (( (ptr) gf←c0151)+58)/* var←c29388 */ ))+7) ); /*1*/ var←c29356 = (word) ( *( (fPt) ((* (ptr) pd40 ))))(widget←v5372, 5, pd40); /*1*/ }; { /*1*/ word pd41; /*1*/ pd41 = (* (( (ptr) (* (( (ptr) gf←c0151)+58)/* var←c29388 */ ))+4) ); /*1*/ (void) ( *( (fPt) ((* (ptr) pd41 ))))(var←c29356, 0, pd41); /*1*/ }; }; SOURCE(2856, 6) return(1); }; SOURCE(2867, 96) if ((matched←v5560 == 65385)) { SOURCE(2902, 53) { word pd42; pd42 = (* (( (ptr) (* (( (ptr) gf←c0151)+58)/* var←c29388 */ ))+5) ); (void) ( *( (fPt) ((* (ptr) pd42 ))))(widget←v5372, (* (( (ptr) keyPress←v5460)+7) ), pd42); }; SOURCE(2957, 6) return(1); }; SOURCE(2968, 261) if (((char←v5504 - 48) <= 9)) { SOURCE(2993, 238) { word val←v5704; word digit←v5732; SOURCE(2995, 25) val←v5704 = (word) GetVal←P480(widget←v5372); SOURCE(3022, 30) digit←v5732 = (char←v5504 - 48); SOURCE(3054, 68) if (( (int)val←v5704 <= (int)214748364)) { SOURCE(3080, 18) /*1*/ val←v5704 = IOP2( * , (int)val←v5704, (int)10); /*1*/ } else { SOURCE(3099, 15) /*1*/ val←v5704 = 2147483647; SOURCE(3116, 6) /*1*/ (void) Beep←P888((word) ((( (bPt) formal←c0152)+24))); /*1*/ }; SOURCE(3125, 74) if (( (int)val←v5704 <= (int)(2147483647 - digit←v5732))) { SOURCE(3154, 21) /*1*/ val←v5704 = (val←v5704 + digit←v5732); /*1*/ } else { SOURCE(3176, 15) /*1*/ val←v5704 = 2147483647; SOURCE(3193, 6) /*1*/ (void) Beep←P888((word) ((( (bPt) formal←c0152)+24))); /*1*/ }; SOURCE(3202, 19) (void) SetVal←P600(widget←v5372, SGNCK(val←v5704), 0); SOURCE(3223, 6) return(1); }; }; SOURCE(3234, 92) if ((char←v5504 == 8)) { SOURCE(3256, 72) { word val←v5776; SOURCE(3258, 25) val←v5776 = (word) GetVal←P480(widget←v5372); SOURCE(3285, 12) val←v5776 = IOP2( / , (int)val←v5776, (int)10); SOURCE(3299, 19) (void) SetVal←P600(widget←v5372, SGNCK(val←v5776), 0); SOURCE(3320, 6) return(1); }; }; SOURCE(3331, 6) (void) Beep←P888((word) ((( (bPt) formal←c0152)+24))); }; }; } else { if ((var←c29420 == 4)) { { word buttonPress←v5820; buttonPress←v5820 = var←c29196; SOURCE(3380, 53) { word pd43; pd43 = (* (( (ptr) (* (( (ptr) gf←c0151)+58)/* var←c29388 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd43 ))))(widget←v5372, (* (( (ptr) buttonPress←v5820)+7) ), pd43); }; }; } else { lab←L100004: ; }; }; }; }; }; return(0); } static word NoName←Q2148(formal←c0153) word formal←c0153; { SOURCE(2581, 57) { word pd44; pd44 = (* (( (ptr) formal←c0153)+5) ); (* (( (ptr) formal←c0153)+6) ) = (word) ( *( (fPt) ((* (ptr) pd44 ))))((* (( (ptr) formal←c0153)+4) ), 8, pd44); }; return(0); } static void Beep←P888(formal←c30156) word formal←c30156; { register ptr gf←c30124 = (ptr) &globalframe; formal←c30156 = (formal←c30156 - 24); /* Beep: */ SOURCE(1930, 16) SOURCE(1948, 30) { word pd45; pd45 = (* (( (ptr) (* (( (ptr) gf←c30124)+51)/* var←c28748 */ ))+132) ); (void) ( *( (fPt) ((* (ptr) pd45 ))))((* (( (ptr) (* (( (ptr) formal←c30156)+4) ))+2) ), 100, 0, pd45); }; } static void Redisplay←P300(widget←v10156, registerData←v10184, callData←v10212, event←v10240) word widget←v10156; word registerData←v10184; word callData←v10212; word event←v10240; { W6 var←c30188; register ptr gf←c30220 = (ptr) &globalframe; /* declaration of var←c29452 skipped */ word val←v5892; /* Redisplay: */ SOURCE(3475, 196) { word tmpAddr46; tmpAddr46 = (word) (( (ptr) &var←c30188)+4)/* var←c29452 */ ; (* (ptr) tmpAddr46 ) = ( ((word) (fPt) ValToText←P1236) ); (* (( (ptr) tmpAddr46) + 1) ) = 1; }; SOURCE(3603, 25) val←v5892 = (word) GetVal←P480(widget←v10156); SOURCE(3630, 41) { word var←c29484; var←c29484 = (word) ValToText←P1236(val←v5892, (word) (( (bPt) &var←c30188)+16)/* var←c29452 */ ); { word pd47; pd47 = (* (( (ptr) (* (( (ptr) gf←c30220)+52)/* var←c28940 */ ))+7) ); (void) ( *( (fPt) ((* (ptr) pd47 ))))(widget←v10156, var←c29484, 2, pd47); }; }; } static word ValToText←P1236(val←v5968, formal←c30284) word val←v5968; word formal←c30284; { register ptr gf←c30252 = (ptr) &globalframe; word r←v6012; formal←c30284 = (formal←c30284 - 16); /* ValToText: */ SOURCE(3511, 87) SOURCE(3511, 87) r←v6012 = 0; SOURCE(3565, 33) { W2 var←c29516; var←c29516.f0 = 5; var←c29516.f1 = val←v5968; { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf←c30252)+59)/* var←c29548 */ ))+63) ); r←v6012 = (word) ( *( (fPt) ((* (ptr) pd48 ))))((* (( (ptr) gf←c30252)+23) ), var←c29516, pd48); }; }; SOURCE(3511, 87) return(r←v6012); } static word IsNumberLabel←P360(widget←v4420) word widget←v4420; { register ptr gf←c30316 = (ptr) &globalframe; word var←c4464; /* IsNumberLabel: */ SOURCE(3677, 124) SOURCE(3744, 57) { word var←c0170; if ((widget←v4420 != 0)) { { word var←c29612; word widget←v28208; word class←v28236; widget←v28208 = widget←v4420; class←v28236 = (* (( (ptr) gf←c30316)+11)/* numberClass←v3420 */ ); { word pd49; if (((* (( (ptr) widget←v28208)+4) ) == class←v28236)) { var←c29612 = 1; } else { pd49 = (* (( (ptr) (* (( (ptr) gf←c30316)+54)/* var←c29004 */ ))+40) ); var←c29612 = (word) ( *( (fPt) ((* (ptr) pd49 ))))(widget←v28208, class←v28236, pd49); }; }; var←c0170 = (0 != var←c29612); }; } else { var←c0170 = 0; }; return(var←c0170); }; } static word Create←P420(formal←c096) word formal←c096; { register ptr gf←c30348 = (ptr) &globalframe; word w←v4720; /* Create: */ SOURCE(3806, 458) SOURCE(3806, 458) w←v4720 = 0; SOURCE(3979, 75) { word pd50; pd50 = (* (( (ptr) (* (( (ptr) gf←c30348)+53)/* var←c28972 */ ))+20) ); (* (ptr) formal←c096 ) = (word) ( *( (fPt) ((* (ptr) pd50 ))))((* (ptr) formal←c096 ), (* (( (ptr) gf←c30348)+11)/* numberClass←v3420 */ ), pd50) ; }; SOURCE(4056, 63) { word pd51; pd51 = (* (( (ptr) (* (( (ptr) gf←c30348)+52)/* var←c28940 */ ))+4) ); w←v4720 = (word) ( *( (fPt) ((* (ptr) pd51 ))))((* (W9Pt) formal←c096/* widgetSpec←v4524 */ ), 0, (* (W4Pt) (( (ptr) formal←c096)+12) /* style←v4636 */ ), pd51); }; SOURCE(4121, 66) { word pd52; pd52 = (* (( (ptr) (* (( (ptr) gf←c30348)+54)/* var←c29004 */ ))+12) ); (void) ( *( (fPt) ((* (ptr) pd52 ))))(w←v4720, (* (ptr) (* (( (ptr) (* (( (ptr) gf←c30348)+60)/* var←c29676 */ ))+11) ) ), (word) ( ( (bPt) gf←c30348)+164)/* var←c28588 */ , 0, pd52); }; SOURCE(4189, 32) (void) SetFilter←P540(w←v4720, (* (( (ptr) formal←c096)+10)/* filter←v4580 */ ), (* (( (ptr) formal←c096)+11)/* filterData←v4608 */ )) ; SOURCE(4223, 15) (void) SetVal←P600(w←v4720, (* (( (ptr) formal←c096)+9)/* init←v4552 */ ), 0); SOURCE(4240, 24) (void) SetEditable←P720(w←v4720, (* (( (ptr) formal←c096)+16)/* editable←v4664 */ )); SOURCE(3806, 458) return(w←v4720); } static word GetVal←P480(widget←v4780) word widget←v4780; { register ptr gf←c30380 = (ptr) &globalframe; word value←v4824; word numberData←v6040; /* GetVal: */ SOURCE(4270, 145) SOURCE(4336, 46) { word numberData←v28112; SOURCE(1415, 1230) numberData←v28112 = 0; SOURCE(1500, 1145) { word idx53; word limit54; numberData←v28112 = XR←Narrow((* ((( (ptr) widget←v4780)+49)+( idx53 = (* (( (ptr) (* (( (ptr) gf←c30380)+11)/* numberClass←v3420 */ ))+4) ), limit54 = (* (( (ptr) widget←v4780)+48) ), BCK(idx53, limit54) )) ), (* (( (ptr) gf←c30380)+19) )); }; SOURCE(1415, 1230) numberData←v6040 = numberData←v28112; }; SOURCE(4384, 31) { word x55; value←v4824 = (x55 = (* (ptr) numberData←v6040 ), MAX((int)(word), x55, 0)); }; SOURCE(4270, 145) return(value←v4824); } static void SetFilter←P540(widget←v4884, filter←v4912, filterData←v4940) word widget←v4884; word filter←v4912; word filterData←v4940; { register ptr gf←c30412 = (ptr) &globalframe; word numberData←v6084; word newFilter←v6112 = 0; /* SetFilter: */ SOURCE(4421, 283) SOURCE(4520, 46) { word numberData←v28064; SOURCE(1415, 1230) numberData←v28064 = 0; SOURCE(1500, 1145) { word idx56; word limit57; numberData←v28064 = XR←Narrow((* ((( (ptr) widget←v4884)+49)+( idx56 = (* (( (ptr) (* (( (ptr) gf←c30412)+11)/* numberClass←v3420 */ ))+4) ), limit57 = (* (( (ptr) widget←v4884)+48) ), BCK(idx56, limit57) )) ), (* (( (ptr) gf←c30412)+19) )); }; SOURCE(1415, 1230) numberData←v6084 = numberData←v28064; }; SOURCE(4600, 71) if ((filter←v4912 != 0)) { SOURCE(4621, 50) { word var←c29772; var←c29772 = XR←NewObject(8, (* (( (ptr) gf←c30412)+13) )); (* (ptr) var←c29772 ) = XR←CheckProc(filter←v4912); (* (( (ptr) var←c29772)+1) ) = filterData←v4940; newFilter←v6112 = var←c29772; }; }; SOURCE(4674, 30) (* (( (ptr) numberData←v6084)+2) ) = newFilter←v6112; } static void SetVal←P600(widget←v5012, value←v5040, event←v5068) word widget←v5012; word value←v5040; word event←v5068; { register ptr gf←c30444 = (ptr) &globalframe; word numberData←v6168; /* SetVal: */ SOURCE(4708, 379) SOURCE(4789, 46) { word numberData←v28016; SOURCE(1415, 1230) numberData←v28016 = 0; SOURCE(1500, 1145) { word idx58; word limit59; numberData←v28016 = XR←Narrow((* ((( (ptr) widget←v5012)+49)+( idx58 = (* (( (ptr) (* (( (ptr) gf←c30444)+11)/* numberClass←v3420 */ ))+4) ), limit59 = (* (( (ptr) widget←v5012)+48) ), BCK(idx58, limit59) )) ), (* (( (ptr) gf←c30444)+19) )); }; SOURCE(1415, 1230) numberData←v6168 = numberData←v28016; }; SOURCE(4837, 250) if (( (int)(* (ptr) numberData←v6168 ) != (int)value←v5040)) { SOURCE(4866, 223) { word new←v6212; word inhibit←v6240 = 0; word filter←v6268; SOURCE(4868, 16) new←v6212 = value←v5040; SOURCE(4909, 41) filter←v6268 = (* (( (ptr) numberData←v6168)+2) ); SOURCE(4952, 82) if ((filter←v6268 != 0)) { SOURCE(4971, 63) { W2 var←c29836; { word pd60; pd60 = (* (ptr) filter←v6268 ); (void) ( *( (fPt) ((* (ptr) pd60 ))))((word) &var←c29836, widget←v5012, (* (( (ptr) filter←v6268)+1) ), value←v5040, event←v5068, pd60) ; }; inhibit←v6240 = var←c29836.f1; new←v6212 = var←c29836.f0; }; }; SOURCE(5036, 51) if ((0 == inhibit←v6240)) { SOURCE(5053, 34) (void) InternalSetVal←P660(widget←v5012, new←v6212, event←v5068); }; }; }; } static void InternalSetVal←P660(widget←v5128, value←v5156, event←v5184) word widget←v5128; word value←v5156; word event←v5184; { register ptr gf←c30476 = (ptr) &globalframe; word numberData←v6324; /* InternalSetVal: */ SOURCE(5096, 268) SOURCE(5185, 46) { word numberData←v27968; SOURCE(1415, 1230) numberData←v27968 = 0; SOURCE(1500, 1145) { word idx61; word limit62; numberData←v27968 = XR←Narrow((* ((( (ptr) widget←v5128)+49)+( idx61 = (* (( (ptr) (* (( (ptr) gf←c30476)+11)/* numberClass←v3420 */ ))+4) ), limit62 = (* (( (ptr) widget←v5128)+48) ), BCK(idx61, limit62) )) ), (* (( (ptr) gf←c30476)+19) )); }; SOURCE(1415, 1230) numberData←v6324 = numberData←v27968; }; SOURCE(5233, 131) if (( (int)(* (ptr) numberData←v6324 ) != (int)value←v5156)) { SOURCE(5264, 22) (* (ptr) numberData←v6324 ) = value←v5156; SOURCE(5288, 76) { word pd63; pd63 = (* (( (ptr) (* (( (ptr) gf←c30476)+53)/* var←c28972 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd63 ))))(widget←v5128, (* (ptr) (* (( (ptr) (* (( (ptr) gf←c30476)+60)/* var←c29676 */ ))+11) ) ), 0, event←v5184, pd63); }; }; } static void SetEditable←P720(widget←v5244, editable←v5272) word widget←v5244; word editable←v5272; { register ptr gf←c30508 = (ptr) &globalframe; word numberData←v6368; /* SetEditable: */ SOURCE(5373, 144) SOURCE(5439, 46) { word numberData←v27920; SOURCE(1415, 1230) numberData←v27920 = 0; SOURCE(1500, 1145) { word idx64; word limit65; numberData←v27920 = XR←Narrow((* ((( (ptr) widget←v5244)+49)+( idx64 = (* (( (ptr) (* (( (ptr) gf←c30508)+11)/* numberClass←v3420 */ ))+4) ), limit65 = (* (( (ptr) widget←v5244)+48) ), BCK(idx64, limit65) )) ), (* (( (ptr) gf←c30508)+19) )); }; SOURCE(1415, 1230) numberData←v6368 = numberData←v27920; }; SOURCE(5487, 30) (* (( (ptr) numberData←v6368)+1) ) = editable←v5272; } static void NumberPreferredSize←P780(formal←c0133, widget←v10300, mode←v10328, proposed←v10356, maySkip←v10384) word formal←c0133; word widget←v10300; word mode←v10328; W5 proposed←v10356; word maySkip←v10384; { W5 preferred←v10428; /* NumberPreferredSize: */ SOURCE(5523, 479) SOURCE(5523, 479) preferred←v10428.f0 = 2147483648; preferred←v10428.f1 = 2147483648; preferred←v10428.f2 = 2147483648; preferred←v10428.f3 = 2147483648; preferred←v10428.f4 = 2147483648; SOURCE(5570, 157) (* (W2Pt) &preferred←v10428 ) = (* (W2Pt) (( (ptr) widget←v10300)+5) ); preferred←v10428.f2 = (* (( (ptr) widget←v10300)+7) ); preferred←v10428.f3 = (* (( (ptr) widget←v10300)+8) ); preferred←v10428.f4 = (* (( (ptr) widget←v10300)+9) ); SOURCE(5730, 89) if (( (int)preferred←v10428.f4 < (int)0)) { SOURCE(5762, 57) preferred←v10428.f4 = 0; (* (( (ptr) widget←v10300)+9) ) = 0; }; SOURCE(5821, 88) if (( (int)preferred←v10428.f2 <= (int)0)) { SOURCE(5853, 56) preferred←v10428.f2 = 60; (* (( (ptr) widget←v10300)+7) ) = 60; }; SOURCE(5911, 91) if (( (int)preferred←v10428.f3 <= (int)0)) { SOURCE(5944, 58) preferred←v10428.f3 = 20; (* (( (ptr) widget←v10300)+8) ) = 20; }; /* removed tail goto */ (* (W5Pt) formal←c0133 ) = preferred←v10428; return; } static void NoName←Q2208(formal←c0139, formal←c200000, formal←c200001, formal←c200002, formal←c200003) word formal←c0139; word formal←c200000; word formal←c200001; word formal←c200002; word formal←c200003; { register ptr gf←c0166 = (ptr) &globalframe; if ((formal←c200001 == (* (( (ptr) (* (( (ptr) gf←c0166)+51)/* var←c28748 */ ))+4) ))) { { word err←v17208; err←v17208 = (* (ptr) formal←c200003 ); SOURCE(1916, 9) (* (ptr) formal←c0139 ) = 2; (* (( (ptr) formal←c0139)+1) ) = 2; return; }; }; (* (ptr) formal←c0139 ) = 0; (* (( (ptr) formal←c0139)+1) ) = 0; return; } static void NoName←Q2268(formal←c0146, formal←c200004, formal←c200005, formal←c200006, formal←c200007) word formal←c0146; word formal←c200004; word formal←c200005; word formal←c200006; word formal←c200007; { register ptr gf←c0167 = (ptr) &globalframe; if ((formal←c200005 == (* (( (ptr) (* (( (ptr) gf←c0167)+57)/* var←c29324 */ ))+7) ))) { { word reason←v21560; word index←v21588; reason←v21560 = (* (ptr) formal←c200007 ); index←v21588 = (* (( (ptr) formal←c200007)+1) ); SOURCE(2639, 6) (void) Beep←P888((word) ((( (bPt) (* (ptr) formal←c200004 ))+24))); SOURCE(2647, 9) (* (ptr) formal←c0146 ) = 2; (* (( (ptr) formal←c0146)+1) ) = 2; return; }; }; (* (ptr) formal←c0146 ) = 0; (* (( (ptr) formal←c0146)+1) ) = 0; return; } /* file: XTkNumberLabelImpl, module: XTkNumberLabelImpl, compiled at: April 21, 1992 12:55:39 pm PDT */ extern void XR←install←XTkNumberLabelImpl() { NoName←Q2028(); } extern void XR←run←XTkNumberLabelImpl() { XR←Start(&globalframe); }