/* Generated with C2C (Cedar To C)*/ /* Copyright (C) 1993 by Xerox Corporation. All rights reserved. */ /* time: January 26, 1993 3:31:51 pm PST */ /* C2C version: October 7, 1992 (native) */ /* ref-counting: off */ /* file: CommanderOnStandardStreamsImpl, module: CommanderOnStandardStreamsImpl */ /* switches: bcfhklnouw */ #include #include static char versionStamp[] = "@(#)mob_version [1073670562,2656242597] CommanderOnStandardStreamsImpl"; typedef unsigned word, *ptr; typedef unsigned char byte, *bPt; typedef unsigned short half, *hPt; typedef struct {word f0, f1, f2, f3, f4, f5, f6, f7;} W8; typedef struct {word f0, f1;} W2; typedef word (*fPt)(); #define SOURCE(p, l) /* source p, l */ static void NoName_Q288(); static void CommanderOnStandardStreamsImpl_P0(); static void RunCommander_P60(); static void Inner_P180(); static word GetEnv_P120(); static struct {unsigned f; char r[16];} string1 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\104\304\000\000"}; static struct {unsigned f; char r[24];} string2 = {1376277, "\007\000\001\002\007\020\001\002\000\007\036\002\004\003\002\004\014\016\015\003\001\000\000"}; static struct {unsigned f; char r[16];} string3 = {917520, "\216\257\300\363\223\326\161\300\017\164\046\072\104\350\000"}; static struct {unsigned f; char r[4];} string4 = {65537, "\001\000\000"}; static struct {unsigned f; char r[48];} string5 = {2883632, "\260\006\005\146\151\162\163\164\216\257\300\055\153\222\376\300\327\164\352\142\100\200\005\004\162\145\163\164\214\216\257\300\055\153\222\376\300\327\164\352\142\100\200\261\000\000\000"}; static struct {unsigned f; char r[4];} string6 = {131074, "\004\003\000"}; static struct {unsigned f; char r[16];} string7 = {851984, "\257\300\055\153\222\376\300\327\164\352\142\100\200\000\000"}; static struct {unsigned f; char r[44];} string8 = {2818092, "\216\260\007\006\154\145\156\147\164\150\210\241\000\200\177\377\005\004\164\145\170\164\254\206\012\011\155\141\170\114\145\156\147\164\150\210\241\000\200\177\377\243\261"}; static struct {unsigned f; char r[4];} string9 = {131076, "\216\251\000"}; static struct {unsigned f; char r[4];} string10 = {4, "\000\000\000"}; static struct {unsigned f; char r[8];} string11 = {458760, "Failure"}; static struct {unsigned f; char r[4];} string12 = {65540, "\012\000\000"}; static struct {unsigned f; char r[32];} string13 = {1835040, "[[COMMANDER_INITIAL_COMMAND=\000\000\000"}; static struct {unsigned f; char r[4];} string14 = {196612, "]]\012"}; static struct {unsigned f; char r[28];} string15 = {1638428, "COMMANDER_INITIAL_PERSIST\000\000"}; static struct {unsigned f; char r[28];} string16 = {1703964, "CommanderOnStandardStreams\000"}; static struct {unsigned f; char r[12];} string17 = {524300, "DontExit\000\000\000"}; static struct {unsigned f; char r[28];} string18 = {1769500, " Exiting Initial Commander\012"}; static struct {unsigned f; char r[28];} string19 = {1572892, " (some commands failed)\012\000\000\000"}; static struct {unsigned f; char r[28];} string20 = {1638428, "COMMANDER_INITIAL_COMMAND\000\000"}; static struct {unsigned f; char r[16];} string21 = {851984, "\257\300\077\376\351\242\300\236\123\013\245\100\164\000\000"}; static struct {unsigned f; char r[8];} string22 = {393222, "\006\0018\004O\377\000"}; static struct {unsigned f; char r[16];} string23 = {851984, "\257\300\055\153\222\376\300\327\164\352\142\100\150\000\000"}; static struct {unsigned f; char r[16];} string24 = {851984, "\257\300\311\235\133\064\300\165\175\234\175\100\150\000\000"}; static struct {unsigned f; char r[16];} string25 = {851984, "\257\300\015\277\004\146\300\034\367\146\045\100\164\000\000"}; static struct {unsigned f; char r[16];} string26 = {851984, "\257\300\363\223\326\161\300\017\164\046\072\100\150\000\000"}; static struct {unsigned f; char r[16];} string27 = {851984, "\257\300\240\236\274\315\300\111\163\325\023\100\150\000\000"}; static struct {unsigned f; char r[16];} string28 = {851984, "\257\300\314\116\377\204\300\167\024\373\125\100\150\000\000"}; static struct {unsigned f; char r[16];} string29 = {851984, "\257\300\241\235\001\025\300\065\011\226\172\100\150\000\000"}; static struct { word f0[4]; word f4; word f5[21]; word f26; word f27; word f28; word f29; word f30; word f31[8]; } globalframe = { {0}, (word) 1, {0}, (word) GetEnv_P120, 0, (word) RunCommander_P60, 0, (word) CommanderOnStandardStreamsImpl_P0, {0} }; static void NoName_Q288() { register ptr gf_c039 = (ptr) &globalframe; word var_c9828; (* (( (ptr) gf_c039)+5) ) = (word) XR_GetTypeIndex((word) &string1, 0, (word) &string2); (* (( (ptr) gf_c039)+6) ) = (word) XR_GetTypeIndex((word) &string3, 0, (word) &string4); (* (( (ptr) gf_c039)+9) ) = (word) XR_GetTypeIndex((word) &string5, 0, (word) &string6); (* (( (ptr) gf_c039)+10) ) = (word) XR_GetTypeIndex((word) &string7, 0, (word) &string6); (* (( (ptr) gf_c039)+12) ) = (word) XR_GetTypeIndex((word) &string8, 0, (word) &string4); (* (( (ptr) gf_c039)+13) ) = (word) XR_GetTypeIndex((word) &string9, 0, (word) &string4); (* (ptr) (( (bPt) gf_c039)+56) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+12) ), (word) &string10); (* (ptr) (( (bPt) gf_c039)+60) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+13) ), (word) &string11); (* (ptr) (( (bPt) gf_c039)+64) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string10); (* (ptr) (( (bPt) gf_c039)+68) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string12); (* (ptr) (( (bPt) gf_c039)+72) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string13); (* (ptr) (( (bPt) gf_c039)+76) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string14); (* (ptr) (( (bPt) gf_c039)+80) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string15); (* (ptr) (( (bPt) gf_c039)+84) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+13) ), (word) &string16); (* (ptr) (( (bPt) gf_c039)+88) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+13) ), (word) &string17); (* (ptr) (( (bPt) gf_c039)+92) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string18); (* (ptr) (( (bPt) gf_c039)+96) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string19); (* (ptr) (( (bPt) gf_c039)+100) ) = (word) XR_GetRefLiteral((* (( (ptr) gf_c039)+6) ), (word) &string20); (void) XR_DeclareGlobalFrame((word) "CommanderOnStandardStreamsImpl", &globalframe, (word) XR_GetTypeIndex((word) &string21, 0, (word) &string22) , (word) (( (bPt) gf_c039)+120)/* var_c9188 */ ); var_c9828 = (word) XR_ImportInterface((word) "Atom", (word) XR_GetTypeIndexS((word) (&string23)), 16); (* (( (ptr) gf_c039)+37)/* var_c9700 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 67895555); (void) XR_ImportProcS(var_c9828, 67634946); var_c9828 = (word) XR_ImportInterface((word) "CommanderOps", (word) XR_GetTypeIndexS((word) (&string24)), 14); (* (( (ptr) gf_c039)+33)/* var_c9348 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 67635970); (void) XR_ImportProcS(var_c9828, 67374337); (void) XR_ImportProcS(var_c9828, 134744322); (void) XR_ImportProcS(var_c9828, 68160516); var_c9828 = (word) XR_ImportInterface((word) "IO", (word) XR_GetTypeIndexS((word) (&string25)), 103); (* (( (ptr) gf_c039)+35)/* var_c9604 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 1071364); var_c9828 = (word) XR_ImportInterface((word) "Rope", (word) XR_GetTypeIndexS((word) (&string26)), 43); (* (( (ptr) gf_c039)+36)/* var_c9668 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 67373825); var_c9828 = (word) XR_ImportInterface((word) "Process", (word) XR_GetTypeIndexS((word) (&string27)), 22); (* (( (ptr) gf_c039)+38)/* var_c9732 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 266497); var_c9828 = (word) XR_ImportInterface((word) "ProcessProps", (word) XR_GetTypeIndexS((word) (&string28)), 6); (* (( (ptr) gf_c039)+34)/* var_c9540 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 524290); var_c9828 = (word) XR_ImportInterface((word) "UXIO", (word) XR_GetTypeIndexS((word) (&string29)), 7); (* (( (ptr) gf_c039)+32)/* var_c9284 */ ) = var_c9828; (void) XR_ImportProcS(var_c9828, 67371009); } static void CommanderOnStandardStreamsImpl_P0(formal_c016, formal_c015) word formal_c016; word formal_c015; { /* CommanderOnStandardStreamsImpl: */ SOURCE(82, 1570) /* moved to installation proc */ SOURCE(1638, 14) (void) RunCommander_P60(); } static void RunCommander_P60() { W8 var_c9860; register ptr gf_c9892 = (ptr) &globalframe; /* declaration of var_c9220 skipped */ /* declaration of cmd_v3084 skipped */ /* declaration of initial_v3140 skipped */ /* RunCommander: */ SOURCE(252, 1129) { word tmpAddr30; tmpAddr30 = (word) (( (ptr) &var_c9860)+4)/* var_c9220 */ ; (* (ptr) tmpAddr30 ) = ( ((word) (fPt) Inner_P180) ); (* (( (ptr) tmpAddr30) + 1) ) = 1; }; SOURCE(275, 133) { word var_c9252; word var_c9316; { word pd31; pd31 = (* (( (ptr) (* (( (ptr) gf_c9892)+32)/* var_c9284 */ ))+4) ); var_c9252 = (word) ( *( (fPt) ((* (ptr) pd31 ))))(0, pd31); }; { word pd32; pd32 = (* (( (ptr) (* (( (ptr) gf_c9892)+32)/* var_c9284 */ ))+4) ); var_c9316 = (word) ( *( (fPt) ((* (ptr) pd32 ))))(1, pd32); }; { word pd33; pd33 = (* (( (ptr) (* (( (ptr) gf_c9892)+33)/* var_c9348 */ ))+16) ); var_c9860.f6/* cmd_v3084 */ = (word) ( *( (fPt) ((* (ptr) pd33 ))))(var_c9252, var_c9316, 0, 0, pd33); }; }; SOURCE(1205, 82) var_c9860.f7/* initial_v3140 */ = ( (0 != (* (( (ptr) gf_c9892)+4)/* firstTime_v2832 */ )) ? (word) GetEnv_P120(var_c9860.f6/* cmd_v3084 */ , (* ( ( (ptr) gf_c9892)+25) )) : (* (( (ptr) gf_c9892)+16) ) ) ; SOURCE(1289, 17) (* (( (ptr) gf_c9892)+4)/* firstTime_v2832 */ ) = 0; SOURCE(1308, 73) { word var_c9380; { word var_c9412; word var_c9444; var_c9412 = XR_NewObject(8, (* (( (ptr) gf_c9892)+9) )); var_c9444 = var_c9412; { word var_c9508; var_c9508 = XR_NewObject(8, (* (( (ptr) gf_c9892)+10) )); (* (ptr) var_c9508 ) = (* (( (ptr) gf_c9892)+14) ); (* (( (ptr) var_c9508)+1) ) = (* (( (ptr) gf_c9892)+14) ); (* (ptr) var_c9444 ) = var_c9508; }; var_c9380 = var_c9412; }; { word pd34; pd34 = (* (( (ptr) (* (( (ptr) gf_c9892)+34)/* var_c9540 */ ))+4) ); (void) ( *( (fPt) ((* (ptr) pd34 ))))(var_c9380, (word) (( (bPt) &var_c9860)+16)/* var_c9220 */ , pd34); }; }; } static void Inner_P180(formal_c9956) word formal_c9956; { register ptr gf_c9924 = (ptr) &globalframe; word result_v3200; word msg_v3228 = 0; word hadFailure_v3256 = 0; word persist_v3284 = 0; word var_c9636; formal_c9956 = (formal_c9956 - 16); /* Inner: */ SOURCE(410, 790) SOURCE(426, 22) result_v3200 = (* (( (ptr) gf_c9924)+15) ); SOURCE(516, 94) if (((* (( (ptr) formal_c9956)+7) ) != 0)) { SOURCE(540, 70) { W2 var_c9572; { word pd35; pd35 = (* (( (ptr) (* (( (ptr) gf_c9924)+33)/* var_c9348 */ ))+13) ); (void) ( *( (fPt) ((* (ptr) pd35 ))))((word) &var_c9572, (* (( (ptr) formal_c9956)+6) ), (* (( (ptr) formal_c9956)+7) ), pd35) ; }; msg_v3228 = var_c9572.f1; result_v3200 = var_c9572.f0; }; }; SOURCE(615, 71) if ((msg_v3228 != 0)) { SOURCE(635, 24) { word pd36; pd36 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd36 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), msg_v3228, 0, 2147483647, pd36); }; SOURCE(661, 25) { word pd37; pd37 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd37 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), (* (( (ptr) gf_c9924)+17) ), 0, 2147483647, pd37) ; }; }; SOURCE(691, 136) if ((result_v3200 == (* (( (ptr) gf_c9924)+15) ))) { SOURCE(717, 51) { word pd38; pd38 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd38 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), (* (( (ptr) gf_c9924)+18) ), 0, 2147483647, pd38) ; }; SOURCE(770, 28) { word pd39; pd39 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd39 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), (* (( (ptr) formal_c9956)+7) ), 0, 2147483647, pd39) ; }; SOURCE(800, 27) { word pd40; pd40 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd40 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), (* (( (ptr) gf_c9924)+19) ), 0, 2147483647, pd40) ; }; }; SOURCE(832, 48) { word pd41; pd41 = (* (( (ptr) (* (( (ptr) gf_c9924)+33)/* var_c9348 */ ))+17) ); hadFailure_v3256 = (word) ( *( (fPt) ((* (ptr) pd41 ))))((* ((( (ptr) formal_c9956)+6)) ), pd41); }; SOURCE(882, 125) { word pd42; word pd43; var_c9636 = (word) GetEnv_P120((* (( (ptr) formal_c9956)+6) ), (* (( (ptr) gf_c9924)+20) )); pd42 = (* (( (ptr) (* (( (ptr) gf_c9924)+36)/* var_c9668 */ ))+15) ); if (( (int)(word) ( *( (fPt) ((* (ptr) pd42 ))))(var_c9636, pd42) > (int)0)) { persist_v3284 = 1; } else { pd43 = (* (( (ptr) (* (( (ptr) gf_c9924)+37)/* var_c9700 */ ))+11) ); persist_v3284 = ((word) ( *( (fPt) ((* (ptr) pd43 ))))((* (( (ptr) gf_c9924)+21) ), (* (( (ptr) gf_c9924)+22) ), pd43) != 0); }; }; SOURCE(1009, 71) if ((0 == persist_v3284)) { SOURCE(1029, 51) { word pd44; pd44 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd44 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+1) ), (* (( (ptr) gf_c9924)+23) ), 0, 2147483647, pd44) ; }; }; SOURCE(1082, 68) if ((0 != hadFailure_v3256)) { SOURCE(1102, 48) { word pd45; pd45 = (* (( (ptr) (* (( (ptr) gf_c9924)+35)/* var_c9604 */ ))+93) ); (void) ( *( (fPt) ((* (ptr) pd45 ))))((* (( (ptr) (* (( (ptr) formal_c9956)+6) ))+2) ), (* (( (ptr) gf_c9924)+24) ), 0, 2147483647, pd45) ; }; }; SOURCE(1154, 46) lab_L100002: ; if (persist_v3284) { } else { goto lab_L100000; }; SOURCE(1171, 29) { word pd46; pd46 = (* (( (ptr) (* (( (ptr) gf_c9924)+38)/* var_c9732 */ ))+21) ); (void) ( *( (fPt) ((* (ptr) pd46 ))))(400000, pd46); }; goto lab_L100002; lab_L100000: ; } static word GetEnv_P120(cmd_v2984, key_v3012) word cmd_v2984; word key_v3012; { register ptr gf_c9988 = (ptr) &globalframe; word var_c3056; /* GetEnv: */ SOURCE(1450, 182) SOURCE(1517, 115) { word var_c9796; { word var_c9764; { word pd47; pd47 = (* (( (ptr) (* (( (ptr) gf_c9988)+37)/* var_c9700 */ ))+5) ); var_c9764 = (word) ( *( (fPt) ((* (ptr) pd47 ))))(key_v3012, 0, 2147483647, pd47); }; { word pd48; pd48 = (* (( (ptr) (* (( (ptr) gf_c9988)+33)/* var_c9348 */ ))+15) ); var_c9796 = (word) ( *( (fPt) ((* (ptr) pd48 ))))(cmd_v2984, var_c9764, pd48); }; }; if ((var_c9796 == 0)) { goto lab_L100003; }; { word tc49; if (((* (( (ptr) gf_c9988)+5) ) == XR_GetReferentType(var_c9796))) { tc49 = (word) ((*(int*)var_c9796<0) == 0); } else { tc49 = (word) 0; }; if (tc49) { { word rope_v3344; rope_v3344 = var_c9796; SOURCE(1594, 13) return(rope_v3344); }; } else { lab_L100003: ; SOURCE(1620, 12) return(0); }; }; }; } /* file: CommanderOnStandardStreamsImpl, module: CommanderOnStandardStreamsImpl, compiled at: January 26, 1993 3:31:50 pm PST */ extern void XR_install_CommanderOnStandardStreamsImpl() { NoName_Q288(); } extern void XR_run_CommanderOnStandardStreamsImpl() { XR_Start(&globalframe); }