#include "M3Runtime.h" #define t58 ADDRESS #define t54 void #define TC58 TC_REFANY IMPORT TYPE TC_REFANY; IMPORT char VS_REFANY__4b8748e831fc107a; #define t2 ADDRESS #define TC2 TC_TEXT IMPORT TYPE TC_TEXT; IMPORT char VS_TEXT__b7a92447326386f5; #define t2_MapProc TC_TEXT->mapProc #define t15 ADDRESS typedef int t10; #define TC15 TC_ADDRESS IMPORT TYPE TC_ADDRESS; IMPORT char VS_ADDRESS__30f7308738738b44; #line 63 ".ROOT/.boots/corelib/Interfaces/Ctypes.i3" #define t17 ADDRESS typedef short t40; typedef unsigned char t4; #line 37 "./Text.i3" typedef struct { char* elts; int size[1]; } t52; #line 156 "Text.m3" #define t5 t52 typedef struct { t4 elts[4096]; } t41; #line 63 ".ROOT/.boots/corelib/Interfaces/Ctypes.i3" #define TC17 TC_Ctypes__String4096 IMPORT TYPE TC_Ctypes__String4096; #line 63 IMPORT char VS_Ctypes__String4096__8d2ce04b3a64ff9f; #line 62 #define t18 ADDRESS typedef short t42; #line 62 typedef struct { t4 elts[1024]; } t43; #define TC18 TC_Ctypes__String1024 IMPORT TYPE TC_Ctypes__String1024; #line 62 IMPORT char VS_Ctypes__String1024__85fe08042cc88853; #line 61 #define t19 ADDRESS typedef unsigned char t35; #line 61 typedef struct { t4 elts[256]; } t44; #define TC19 TC_Ctypes__String256 IMPORT TYPE TC_Ctypes__String256; #line 61 IMPORT char VS_Ctypes__String256__e84eeb8129c76f43; #line 60 #define t20 ADDRESS typedef signed_char t45; #line 60 typedef struct { t4 elts[64]; } t46; #define TC20 TC_Ctypes__String64 IMPORT TYPE TC_Ctypes__String64; #line 60 IMPORT char VS_Ctypes__String64__e232939e2f4ff601; #line 59 #define t21 ADDRESS typedef signed_char t47; #line 59 typedef struct { t4 elts[16]; } t48; #define TC21 TC_Ctypes__String16 IMPORT TYPE TC_Ctypes__String16; #line 59 IMPORT char VS_Ctypes__String16__46fccbf225a113eb; #line 58 #define t22 ADDRESS typedef signed_char t49; #line 58 typedef struct { t4 elts[4]; } t50; #define TC22 TC_Ctypes__String4 IMPORT TYPE TC_Ctypes__String4; #line 58 IMPORT char VS_Ctypes__String4__1ecbc452350ba764; #line 52 #define t23 ADDRESS typedef unsigned short t24; #line 52 #define TC23 TC_Ctypes__UnsignedShortStar IMPORT TYPE TC_Ctypes__UnsignedShortStar; #line 52 IMPORT char VS_Ctypes__UnsignedShortStar__ba7321c22f5477f7; #line 50 #define t25 ADDRESS #define t26 ADDRESS typedef short t27; #line 49 #define TC26 TC_Ctypes__ShortStar IMPORT TYPE TC_Ctypes__ShortStar; #line 49 IMPORT char VS_Ctypes__ShortStar__ceeffab3338d5be6; #define TC25 TC_Ctypes__ShortStarStar IMPORT TYPE TC_Ctypes__ShortStarStar; #line 50 IMPORT char VS_Ctypes__ShortStarStar__1827fd6f22a4a56a; #line 46 #define t28 ADDRESS #define TC28 TC_Ctypes__IntStar IMPORT TYPE TC_Ctypes__IntStar; #line 46 IMPORT char VS_Ctypes__IntStar__e39a77b6392d7c83; #line 44 #define t29 ADDRESS #define TC29 TC_Ctypes__IntStarStar IMPORT TYPE TC_Ctypes__IntStarStar; #line 44 IMPORT char VS_Ctypes__IntStarStar__a46afe5b32b9d475; #line 33 #define t31 ADDRESS typedef float t32; #line 33 #define TC31 TC_Ctypes__FloatStar IMPORT TYPE TC_Ctypes__FloatStar; #line 33 IMPORT char VS_Ctypes__FloatStar__6c7e0b722780a93f; #line 26 #define t33 ADDRESS #define TC33 TC_Ctypes__UnsignedCharStar IMPORT TYPE TC_Ctypes__UnsignedCharStar; #line 26 IMPORT char VS_Ctypes__UnsignedCharStar__5ba21f95225c580b; #define t34 ADDRESS #define TC34 TC_Ctypes__UnsignedCharStarStar IMPORT TYPE TC_Ctypes__UnsignedCharStarStar; #line 27 IMPORT char VS_Ctypes__UnsignedCharStarStar__64970e213b9e555a; #line 24 #define t36 ADDRESS #define t37 ADDRESS #define TC37 TC_Ctypes__CharStarStar IMPORT TYPE TC_Ctypes__CharStarStar; #line 23 IMPORT char VS_Ctypes__CharStarStar__5cd33554337263a0; #define TC36 TC_Ctypes__CharStarStarStar IMPORT TYPE TC_Ctypes__CharStarStarStar; #line 24 IMPORT char VS_Ctypes__CharStarStarStar__a792f1ad3925ee76; #line 17 #define t39 ADDRESS typedef double t30; #line 17 #define TC39 TC_Ctypes__DoubleStar IMPORT TYPE TC_Ctypes__DoubleStar; #line 17 IMPORT char VS_Ctypes__DoubleStar__09a97cc036088f62; #line 20 "./TextF.i3" #define t51 ADDRESS #define TC51 TC_TEXT #define t59 ADDRESS #define TC59 TC_NULL IMPORT TYPE TC_NULL; IMPORT char VS_NULL__fb50c7d53bec30dc; typedef unsigned char t1; #line 160 "Text.m3" typedef t1 (*t3)(); #line 156 typedef t2 (*t6)(); #line 152 typedef t54 (*t7)(); #line 126 typedef signed_char t8; typedef t8 (*t9)(); #line 114 typedef t10 (*t11)(); typedef int t12; #line 48 typedef t12 (*t13)(); #line 43 typedef t4 (*t14)(); #line 122 ".ROOT/.boots/corelib/Interfaces/Cstring.i3" typedef t15 (*t16)(); #line 19 ".ROOT/.boots/corelib/Interfaces/Ctypes.i3" typedef signed_char t38; typedef CLOSURE t53; #define t57 ADDRESS typedef struct { TYPE self; int private; } t57_methods; #define t57_msize (sizeof (t57_methods)) typedef struct { ADDRESS methods; } t57_fields; #define t57_size (sizeof (t57_fields)) #define TC57 TC_ROOT IMPORT TYPE TC_ROOT; IMPORT char VS_ROOT__349f58f628be0ac6; #define t57_MapProc TC_ROOT->mapProc #define t55 ADDRESS #define TC55 TC_MUTEX IMPORT TYPE TC_MUTEX; IMPORT char VS_MUTEX__1f9d4e89391ab815; #define t55_MapProc TC_MUTEX->mapProc #define t56 ADDRESS typedef struct { TYPE self; int private; } t56_methods; #define t56_msize (sizeof (t56_methods)) typedef struct { ADDRESS methods; } t56_fields; #define t56_size (sizeof (t56_fields)) #define TC56 TC_UNTRACED_ROOT IMPORT TYPE TC_UNTRACED_ROOT; IMPORT char VS_UNTRACED_ROOT__3e0964513fd6da20; #line 9 "Text.m3" IMPORT INITLINK* Cstring__init; IMPORT INITLINK* TextF__init; IMPORT INITLINK* Text__init; IMPORT TYPE TC_Ctypes__void_star; #line 9 IMPORT char VS_Ctypes__void_star__19d3329e3120388d; IMPORT TYPE TC_Ctypes__const_void_star; IMPORT char VS_Ctypes__const_void_star__08cf56d720e0de78; #line 9 IMPORT TYPE TC_Ctypes__const_char_star; IMPORT char VS_Ctypes__const_char_star__81d35d212987031d; IMPORT TYPE TC_Ctypes__char_star; #line 9 IMPORT char VS_Ctypes__char_star__90cf39683847e5e8; IMPORT t15 memcpy (); IMPORT char VSmemcpy__9045c6d328a9c17c; EXPORT t2 _TextF__New (); #line 9 EXPORT char VS_TextF__New__8fe5c34334e2bc1b = '\0'; IMPORT TYPE TC_Text__T; IMPORT char VS_Text__T__fc4b369f3ab271fd; EXPORT t2 _Text__Cat (); #line 9 EXPORT char VS_Text__Cat__67b157bc3c80150f = '\0'; EXPORT t1 _Text__Equal (); EXPORT char VS_Text__Equal__f19b6e6f34d36826 = '\0'; #line 9 EXPORT t4 _Text__GetChar (); EXPORT char VS_Text__GetChar__0f4bd6e72493f4ff = '\0'; EXPORT t12 _Text__Length (); EXPORT char VS_Text__Length__661a58173d76f41c = '\0'; #line 9 EXPORT t1 _Text__Empty (); EXPORT char VS_Text__Empty__f8aa6446353b9de8 = '\0'; EXPORT t2 _Text__Sub (); EXPORT char VS_Text__Sub__ba151c702fe1a06f = '\0'; #line 9 EXPORT t54 _Text__SetChars (); EXPORT char VS_Text__SetChars__bc9d6611221daa06 = '\0'; EXPORT t2 _Text__FromChar (); EXPORT char VS_Text__FromChar__3896ff8a3ced0505 = '\0'; #line 9 EXPORT t2 _Text__FromChars (); EXPORT char VS_Text__FromChars__4adb855d24ac83e3 = '\0'; EXPORT t54 _Text__PutStr (); EXPORT char VS_Text__PutStr__d073d76a395ab9cd = '\0'; #line 9 EXPORT t2 _Text__FromStr (); EXPORT char VS_Text__FromStr__4675e29c281840d3 = '\0'; EXPORT t1 _Text__IsEmpty (); EXPORT char VS_Text__IsEmpty__9b3b446520741b37 = '\0'; #line 9 EXPORT t10 _Text__FindChar (); EXPORT char VS_Text__FindChar__e1f24fdd3abfb03c = '\0'; EXPORT t10 _Text__FindCharR (); EXPORT char VS_Text__FindCharR__d752d4c536319500 = '\0'; #line 9 EXPORT t8 _Text__Compare (); EXPORT char VS_Text__Compare__920fdd773789443c = '\0'; IMPORT char VS_TEXT__db80a199220abd03; #line 9 #line 13 "Text.m3" EXPORT t2 _TextF__New (_n) t12 _n; { t2 z0; t10 z3; t2 z2; t10 z4; t12 z5; #line 13 "Text.m3" { HANDLER hproc_0; PUSH_RAISES (hproc_0, raises_1, proc_0); { auto t2 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; { t2 with; { register t52* ptr; int sz[1]; z3 = _n + 1 ; sz[0] = z3; ptr = (t52*) TNEWA(TC2, 8 + sz[0] * 1); ptr->elts = (char*)(& ptr->size[1]); #line 15 ptr->size[0] = sz[0]; z0 = (t2) ptr; }; with = z0; { auto t2 _t; { ZERO1 (& _t); _t = with; NILCHECKB (z2 = _t); { register t52* array = & (*((t5*) z2)); z5 = _n; if (z5 >= (array->size[0])) RANGEFAULT; #line 16 z4 = (int)(array->elts + (z5 * 1)); }; (*(t4*)z4) = '\000' ; __result = _t; CUT_TO_NEXT_HANDLER (hproc_0); return __result; } } }; } } proc_0: CUT_TO_NEXT_HANDLER (hproc_0); #line 17 if (hproc_0.exception != 0) RAISE_FOR_SURE (hproc_0.exception); }; }; #line 21 "Text.m3" EXPORT t2 _Text__Cat (_t, _u) t2 _t; t2 _u; { t1 z2; t12 z0; t2 z3; t2 z1; t10 z4; t10 z5; t15 z6; t15 z7; t15 z8; t10 z9; #line 21 "Text.m3" { auto t2 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { __result = _u; return __result; }; z2 = (_u == 0); if (z2) { __result = _t; return __result; }; { t12 with; NILCHECKB (z3 = _t); z0 = (*((t5*) z3)).size[0]; with = z0; { auto t12 _nt; { ZERO1 (& _nt); _nt = with; #line 25 { t12 with; NILCHECKB (z3 = _u); z0 = (*((t5*) z3)).size[0]; with = z0; { auto t12 _nu; { ZERO1 (& _nu); _nu = with; #line 25 { t2 with; { register t52* ptr; int sz[1]; z4 = _nt + _nu; z5 = z4 - 1 ; sz[0] = z5; ptr = (t52*) TNEWA(TC2, 8 + sz[0] * 1); #line 25 ptr->elts = (char*)(& ptr->size[1]); ptr->size[0] = sz[0]; z1 = (t2) ptr; }; with = z1; { auto t2 _res; #line 25 { ZERO1 (& _res); _res = with; NILCHECKB (z3 = _res); { register t52* array = & (*((t5*) z3)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 26 z4 = (int)(array->elts + (z5 * 1)); }; z6 = (char*)(& (*(t4*)z4)); NILCHECKB (z3 = _t); #line 26 { register t52* array = & (*((t5*) z3)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 26 z4 = (int)(array->elts + (z5 * 1)); }; z7 = (char*)(& (*(t4*)z4)); z4 = _nt - 1 ; z8 = memcpy (z6, z7, z4); NILCHECKB (z3 = _res); z5 = _nt - 1 ; z4 = z5; if (z4 < 0) RANGEFAULT; { register t52* array = & (*((t5*) z3)); #line 27 z9 = z4; if (z9 >= (array->size[0])) RANGEFAULT; z5 = (int)(array->elts + (z9 * 1)); }; #line 27 z6 = (char*)(& (*(t4*)z5)); NILCHECKB (z3 = _u); { register t52* array = & (*((t5*) z3)); #line 27 z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; z4 = (int)(array->elts + (z5 * 1)); #line 27 }; z7 = (char*)(& (*(t4*)z4)); z8 = memcpy (z6, z7, _nu); __result = _res; return __result; } } }; } } }; } } }; } } }; #line 32 "Text.m3" EXPORT t1 _Text__Equal (_t, _u) t2 _t; t2 _u; { t1 z2; t1 z0; t12 z1; t2 z3; t1 z4; t2 z5; #line 32 "Text.m3" { auto t1 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); z0 = z4; }; if (z0) { z2 = (_u == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _u); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); z0 = z4; }; #line 35 __result = z0; return __result; }; z2 = (_u == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _u); z1 = (*((t5*) z3)).size[0]; #line 35 z4 = (z1 <= 1 ); z0 = z4; }; if (z0) { __result = 0 ; return __result; }; NILCHECKB (z3 = _t); NILCHECKB (z5 = _u); { t5 *arg1 = &((*((t5*) z3))); t5 *arg2 = &((*((t5*) z5))); z2 = 0 /* FALSE */; if ((*arg1).size[0] != (*arg2).size[0]) goto fail_0001; #line 39 { t4 *arg11 = (t4 *)((*arg1).elts); t4 *arg22 = (t4 *)((*arg2).elts); { int init_0002; for (init_0002 = 0; init_0002 < (*arg1).size[0]; init_0002++) { #line 39 if ((*arg11) != (*arg22)) goto fail_0001; arg11++; arg22++; }; }; }; z2 = 1 /* TRUE */; fail_0001:; }; #line 39 __result = z2; return __result; } } }; #line 43 "Text.m3" EXPORT t4 _Text__GetChar (_t, _i) t2 _t; t12 _i; { t2 z1; t10 z3; t12 z4; #line 43 "Text.m3" { auto t4 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; NILCHECKB (z1 = _t); { register t52* array = & (*((t5*) z1)); z4 = _i; if (z4 >= (array->size[0])) RANGEFAULT; z3 = (int)(array->elts + (z4 * 1)); #line 45 }; __result = (*(t4*)z3); return __result; } } }; #line 48 "Text.m3" EXPORT t12 _Text__Length (_t) t2 _t; { t1 z2; t12 z1; t2 z3; t10 z4; t10 z5; t10 z6; t10 z0; #line 48 "Text.m3" { auto t12 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { __result = 0 ; return __result; }; NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = z1 - 1 ; z5 = 0 ; z6 = z4; if (z5 < z6) z5 = z6; z0 = z5; if (z0 < 0) RANGEFAULT; #line 52 __result = z0; return __result; } } }; #line 56 "Text.m3" EXPORT t1 _Text__Empty (_t) t2 _t; { t1 z2; t1 z0; t12 z1; t2 z3; t1 z4; #line 56 "Text.m3" { auto t1 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); z0 = z4; }; __result = z0; #line 58 return __result; } } }; #line 61 "Text.m3" EXPORT t2 _Text__Sub (_t, _start, _length) t2 _t; t12 _start; t12 _length; { t1 z2; t12 z0; t2 z3; t10 z4; t10 z1; t12 z5; t10 z6; t15 z7; t15 z8; t15 z9; t10 z10; #line 61 "Text.m3" { auto t2 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { __result = 0; return __result; }; { t10 with; NILCHECKB (z3 = _t); z0 = (*((t5*) z3)).size[0]; z4 = z0 - 1 ; with = z4; { auto t10 _n; { _n = with; z2 = (_start >= _n); if (z2) { __result = 0; return __result; }; { t10 with; z4 = _n - _start; z1 = z4; z5 = _length; if (z1 > z5) z1 = z5; with = z1; { auto t10 _len; { _len = with; #line 66 { t2 with; { register t52* ptr; int sz[1]; z4 = _len + 1 ; sz[0] = z4; ptr = (t52*) TNEWA(TC2, 8 + sz[0] * 1); #line 66 ptr->elts = (char*)(& ptr->size[1]); ptr->size[0] = sz[0]; z3 = (t2) ptr; }; with = z3; { auto t2 _res; #line 66 { ZERO1 (& _res); _res = with; NILCHECKB (z3 = _res); { register t52* array = & (*((t5*) z3)); z6 = 0 ; if (z6 >= (array->size[0])) RANGEFAULT; #line 67 z4 = (int)(array->elts + (z6 * 1)); }; z7 = (char*)(& (*(t4*)z4)); NILCHECKB (z3 = _t); #line 67 { register t52* array = & (*((t5*) z3)); z5 = _start; if (z5 >= (array->size[0])) RANGEFAULT; #line 67 z4 = (int)(array->elts + (z5 * 1)); }; z8 = (char*)(& (*(t4*)z4)); z9 = memcpy (z7, z8, _len); NILCHECKB (z3 = _res); z4 = _len; if (z4 < 0) RANGEFAULT; { register t52* array = & (*((t5*) z3)); #line 68 z10 = z4; if (z10 >= (array->size[0])) RANGEFAULT; z6 = (int)(array->elts + (z10 * 1)); #line 68 }; (*(t4*)z6) = '\000' ; __result = _res; return __result; } } }; } } }; } } }; } } }; #line 74 "Text.m3" EXPORT t54 _Text__SetChars (_a, _t) t5 * _a; t2 _t; { t1 z2; t12 z0; t12 z1; t2 z3; t10 z4; t10 z5; t15 z6; t15 z7; t15 z8; #line 74 "Text.m3" { { CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { return; }; { t10 with; z0 = (*_a).size[0]; NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = z1 - 1 ; z1 = z0; z5 = z4; if (z1 > z5) z1 = z5; #line 77 with = z1; { auto t10 _n; { _n = with; { register t52* array = & (*_a); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; z4 = (int)(array->elts + (z5 * 1)); #line 78 }; z6 = (char*)(& (*(t4*)z4)); NILCHECKB (z3 = _t); { register t52* array = & (*((t5*) z3)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 78 z4 = (int)(array->elts + (z5 * 1)); }; z7 = (char*)(& (*(t4*)z4)); z8 = memcpy (z6, z7, _n); } } }; } } #line 78 }; #line 82 "Text.m3" EXPORT t2 _Text__FromChar (_c) t4 _c; { t2 z0; t2 z2; t10 z4; t10 z5; #line 82 "Text.m3" { auto t2 _res; auto t2 __result; { ZERO1 (& _res); #line 82 ZERO1 (& __result); { register t52* ptr; int sz[1]; sz[0] = 2 ; ptr = (t52*) TNEWA(TC2, 8 + sz[0] * 1); ptr->elts = (char*)(& ptr->size[1]); #line 83 ptr->size[0] = sz[0]; z0 = (t2) ptr; }; _res = z0; #line 82 CHECKSTACKOVERFLOW; NILCHECKB (z2 = _res); { register t52* array = & (*((t5*) z2)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; z4 = (int)(array->elts + (z5 * 1)); #line 85 }; (*(t4*)z4) = _c; NILCHECKB (z2 = _res); { register t52* array = & (*((t5*) z2)); z5 = 1 ; if (z5 >= (array->size[0])) RANGEFAULT; z4 = (int)(array->elts + (z5 * 1)); #line 86 }; (*(t4*)z4) = '\000' ; __result = _res; return __result; } } }; #line 90 "Text.m3" EXPORT t2 _Text__FromChars (_a) t5 * _a; { t12 z0; t1 z2; t2 z1; t10 z3; t2 z4; t10 z5; t15 z6; t15 z7; t15 z8; t12 z9; #line 90 "Text.m3" { auto t2 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; { t12 with; z0 = (*_a).size[0]; with = z0; { auto t12 _n; { ZERO1 (& _n); _n = with; z2 = (_n == 0 ); if (z2) { __result = 0; return __result; }; { t2 with; { register t52* ptr; int sz[1]; z3 = _n + 1 ; sz[0] = z3; ptr = (t52*) TNEWA(TC2, 8 + sz[0] * 1); #line 94 ptr->elts = (char*)(& ptr->size[1]); ptr->size[0] = sz[0]; z1 = (t2) ptr; }; with = z1; { auto t2 _res; #line 94 { ZERO1 (& _res); _res = with; NILCHECKB (z4 = _res); { register t52* array = & (*((t5*) z4)); z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; #line 95 z3 = (int)(array->elts + (z5 * 1)); }; z6 = (char*)(& (*(t4*)z3)); { register t52* array = & (*_a); #line 95 z5 = 0 ; if (z5 >= (array->size[0])) RANGEFAULT; z3 = (int)(array->elts + (z5 * 1)); }; z7 = (char*)(& (*(t4*)z3)); #line 95 z8 = memcpy (z6, z7, _n); NILCHECKB (z4 = _res); { register t52* array = & (*((t5*) z4)); z9 = _n; if (z9 >= (array->size[0])) RANGEFAULT; #line 96 z3 = (int)(array->elts + (z9 * 1)); }; (*(t4*)z3) = '\000' ; __result = _res; return __result; } } }; } } }; } } }; #line 102 "Text.m3" EXPORT t10 _Text__FindChar (_t, _c, _start) t2 _t; t4 _c; t10 _start; { t1 z2; t1 z0; t1 z3; t10 z1; t12 z4; t2 z5; t10 z6; t10 z7; #line 102 "Text.m3" { auto t10 __result; { CHECKSTACKOVERFLOW; z2 = (_t == 0); z0 = 1; if (! z2) { z3 = (_start < 0 ); z0 = z3; }; if (z0) { z1 = - 1 ; __result = z1; return __result; #line 104 }; { t10 with; NILCHECKB (z5 = _t); z4 = (*((t5*) z5)).size[0]; z1 = z4 - 1 ; with = z1; { auto t10 _len; { _len = with; loop_0:; z2 = (_start >= _len); if (z2) { z1 = - 1 ; __result = z1; return __result; }; NILCHECKB (z5 = _t); z6 = _start; if (z6 < 0) RANGEFAULT; { register t52* array = & (*((t5*) z5)); z7 = z6; #line 108 if (z7 >= (array->size[0])) RANGEFAULT; z1 = (int)(array->elts + (z7 * 1)); }; z3 = ((*(t4*)z1) == _c); #line 108 if (z3) { __result = _start; return __result; }; _start += 1 ; goto loop_0; } } }; } } }; #line 114 "Text.m3" EXPORT t10 _Text__FindCharR (_t, _c, _start) t2 _t; t4 _c; t10 _start; { t1 z2; t10 z1; t12 z0; t2 z3; t10 z4; t10 z5; t1 z6; #line 114 "Text.m3" { auto t10 _i; auto t10 __result; { CHECKSTACKOVERFLOW; z2 = (_t == 0); if (z2) { z1 = - 1 ; __result = z1; return __result; }; NILCHECKB (z3 = _t); z0 = (*((t5*) z3)).size[0]; z4 = z0 - 2 ; z1 = z4; z5 = _start; if (z1 > z5) z1 = z5; _i = z1; loop_1:; z2 = (_i < 0 ); if (z2) { z1 = - 1 ; __result = z1; return __result; }; NILCHECKB (z3 = _t); z4 = _i; if (z4 < 0) RANGEFAULT; { register t52* array = & (*((t5*) z3)); z5 = z4; if (z5 >= (array->size[0])) RANGEFAULT; #line 121 z1 = (int)(array->elts + (z5 * 1)); }; z6 = ((*(t4*)z1) == _c); if (z6) { __result = _i; return __result; }; _i -= 1 ; goto loop_1; } } }; #line 126 "Text.m3" EXPORT t8 _Text__Compare (_t, _u) t2 _t; t2 _u; { t1 z2; t1 z0; t12 z1; t2 z3; t1 z4; t10 z5; t10 z6; t10 z7; #line 126 "Text.m3" { auto t8 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; { t1 with; z2 = (_t == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); z0 = z4; #line 128 }; with = z0; { auto t1 _tEmpty; { ZERO1B (& _tEmpty); _tEmpty = with; { t1 with; z2 = (_u == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _u); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); #line 129 z0 = z4; }; with = z0; { auto t1 _uEmpty; { ZERO1B (& _uEmpty); _uEmpty = with; if (_tEmpty) { if (_uEmpty) { __result = 0 ; return __result; }; z5 = - 1 ; z6 = z5; if ((z6 < -1) || (1 < z6)) RANGEFAULT; #line 131 __result = z6; return __result; }; if (_uEmpty) { __result = 1 ; return __result; }; { t10 with; NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z5 = z1 - 1 ; with = z5; { auto t10 _tn; #line 135 { _tn = with; { t10 with; NILCHECKB (z3 = _u); z1 = (*((t5*) z3)).size[0]; z5 = z1 - 1 ; #line 135 with = z5; { auto t10 _tu; { _tu = with; { int from, to, index; from = 0 ; z5 = _tn; z6 = _tu; if (z5 > z6) z5 = z6; #line 136 to = z5; { auto t10 _i; { for (index = from; index <= to; index += 1) { _i = (t10) index; NILCHECKB (z3 = _t); { register t52* array = & (*((t5*) z3)); z6 = _i; #line 137 if (z6 >= (array->size[0])) RANGEFAULT; z5 = (int)(array->elts + (z6 * 1)); #line 137 }; NILCHECKB (z3 = _u); { register t52* array = & (*((t5*) z3)); z7 = _i; if (z7 >= (array->size[0])) RANGEFAULT; z6 = (int)(array->elts + (z7 * 1)); #line 137 }; z2 = ((*(t4*)z5) < (*(t4*)z6)); if (z2) { z5 = - 1 ; z6 = z5; if ((z6 < -1) || (1 < z6)) RANGEFAULT; __result = z6; #line 137 return __result; }; NILCHECKB (z3 = _t); { register t52* array = & (*((t5*) z3)); #line 137 z6 = _i; if (z6 >= (array->size[0])) RANGEFAULT; z5 = (int)(array->elts + (z6 * 1)); #line 137 }; NILCHECKB (z3 = _u); { register t52* array = & (*((t5*) z3)); z7 = _i; if (z7 >= (array->size[0])) RANGEFAULT; z6 = (int)(array->elts + (z7 * 1)); #line 137 }; z2 = ((*(t4*)z5) > (*(t4*)z6)); if (z2) { z5 = 1 ; if ((z5 < -1) || (1 < z5)) RANGEFAULT; __result = z5; #line 138 return __result; }; } } }; }; z2 = (_tn == _tu); if (z2) { __result = 0 ; return __result; }; z2 = (_tn < _tu); #line 141 if (z2) { z5 = - 1 ; z6 = z5; if ((z6 < -1) || (1 < z6)) RANGEFAULT; __result = z6; #line 142 return __result; }; z5 = 1 ; if ((z5 < -1) || (1 < z5)) RANGEFAULT; __result = z5; return __result; } #line 143 } }; } } }; } } }; } } }; } } }; #line 152 "Text.m3" EXPORT t54 _Text__PutStr (_a, _t) t5 * _a; t2 _t; { #line 152 "Text.m3" { { CHECKSTACKOVERFLOW; _Text__SetChars (&(*_a), _t); } } }; #line 156 "Text.m3" EXPORT t2 _Text__FromStr (_a) t5 * _a; { t2 z2; #line 156 "Text.m3" { auto t2 __result; { ZERO1 (& __result); CHECKSTACKOVERFLOW; z2 = _Text__FromChars (&(*_a)); __result = z2; return __result; } } }; #line 160 "Text.m3" EXPORT t1 _Text__IsEmpty (_t) t2 _t; { t1 z2; t1 z0; t12 z1; t2 z3; t1 z4; #line 160 "Text.m3" { auto t1 __result; { ZERO1B (& __result); CHECKSTACKOVERFLOW; z2 = (_t == 0); z0 = 1; if (! z2) { NILCHECKB (z3 = _t); z1 = (*((t5*) z3)).size[0]; z4 = (z1 <= 1 ); z0 = z4; }; __result = z0; #line 162 return __result; } } }; PRIVATE int init_done = -1; #line 162 "Text.m3" PRIVATE void Text__initProc (g) int g; { #line 162 "Text.m3" if (init_done >= g) return; init_done = g; INITIALIZE (& TextF__init); INITIALIZE (& Text__init); INITIALIZE (& Cstring__init); #line 162 return; }; PRIVATE INITLINK me_0 ={(INITLINK*)NIL, 0, Text__initProc}; PRIVATE INITLINK me_1 ={(INITLINK*)NIL, 0, Text__initProc}; static char* VSimports[] = { &VS_Ctypes__void_star__19d3329e3120388d, &VS_Ctypes__const_void_star__08cf56d720e0de78, &VS_Ctypes__const_char_star__81d35d212987031d, &VS_Ctypes__char_star__90cf39683847e5e8, &VS_Text__T__fc4b369f3ab271fd, NIL }; void Text__MLink (phase) int phase; { switch (phase) { case 0: { me_0.link = TextF__init; TextF__init = & me_0; me_1.link = Text__init; Text__init = & me_1; break; }; case 1: { break; }; case 2: { break; }; }; };