1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264
|
/* file generated by oo2c -- do not edit */
#include "__oo2c.h"
#include "__libc.h"
#include "GenInclude.d"
static _ModId _mid;
void GenInclude__IncludeFile(TextRider__Writer w, const unsigned char* name__ref, int name_0d, const unsigned char* suffix__ref, int suffix_0d) {
register int i0, i1, i2;
unsigned char* name;
unsigned char* suffix;
char* _old_top_vs = _top_vs;
_push_value(int, name, name__ref, name_0d);
_push_value(int, suffix, suffix__ref, suffix_0d);
i2 = *(int*)((int)w-4);
i0 = (int)((_Type)i2)->tbprocs[5];
i1 = (int)((_Type)i2)->tbprocs[19];
((_TBP_TextRider__WriterDesc_WriteLn)i1)((TextRider__Writer)(int)w);
((_TBP_TextRider__WriterDesc_WriteString)i0)((TextRider__Writer)(int)w, (const unsigned char*)(int)_c0, 11);
ParamPaths__NormalizeFileName((unsigned char*)(int)name, name_0d);
((_TBP_TextRider__WriterDesc_WriteString)i0)((TextRider__Writer)(int)w, (const unsigned char*)(int)name, name_0d);
i1 = (int)((_Type)i2)->tbprocs[7];
((_TBP_TextRider__WriterDesc_WriteString)i0)((TextRider__Writer)(int)w, (const unsigned char*)(int)suffix, suffix_0d);
((_TBP_TextRider__WriterDesc_WriteChar)i1)((TextRider__Writer)(int)w, (unsigned char)34);
_top_vs = _old_top_vs;
}
void GenInclude__Include(TextRider__Writer w, Data__Object module, const unsigned char* suffix__ref, int suffix_0d, unsigned char ignoreFlag) {
register int i0, i1;
unsigned char* suffix;
char* _old_top_vs = _top_vs;
_push_value(int, suffix, suffix__ref, suffix_0d);
i0 = (int)module + 48;
i1 = *(short int*)i0;
i0 = i1 == -32768;
if (i0) goto l0;
i1 = i1 <= -1;
if (i1) goto l2;
l0:
if (ignoreFlag) goto l1;
i0 = (int)module + 68;
i0 = *(unsigned int*)i0;
i0 = (i0 & ((unsigned int)1 << 29)) != 0;
if (i0) goto l2;
l1:
i1 = (int)module + 20;
i0 = (int)*(void**)i1;
i1 = *(int*)(i0-8);
GenInclude__IncludeFile((TextRider__Writer)(int)w, (const unsigned char*)i0, i1, (const unsigned char*)(int)suffix, suffix_0d);
i1 = (int)module + 68;
i0 = *(unsigned int*)i1;
i0 = i0 | ((unsigned int)1 << 29);
*(unsigned int*)i1 = i0;
l2:
_top_vs = _old_top_vs;
}
unsigned char GenInclude__AddOptions_MatchesHeader(const unsigned char* pattern__ref, int pattern_0d) {
register int i0, i1, i2, i3, i4;
unsigned char suffix[256];
unsigned char* pattern;
char* _old_top_vs = _top_vs;
_push_value(int, pattern, pattern__ref, pattern_0d);
i0 = Strings__Length((const unsigned char*)(int)pattern, pattern_0d);
i1 = i0 - 1;
i0 = i1 >= 0;
if (!(i0)) goto l1;
i4 = (int)pattern + i1;
i4 = *(unsigned char*)i4;
i2 = i4 == 46;
if (i2) goto l1;
i3 = i1;
l0:
i3--;
i4 = i3 < 0;
if (i4) goto l2;
i4 = (int)pattern + i3;
i4 = *(unsigned char*)i4;
i4 = i4 != 46;
if (i4) goto l0;
goto l2;
l1:
i3 = i1;
l2:
i2 = i3 >= 0;
if (i2) goto l3;
i2 = 0;
goto l6;
l3:
Strings__Extract((const unsigned char*)(int)pattern, pattern_0d, (short int)i3, (short int)32767, (unsigned char*)(int)suffix, 256);
i2 = Strings2__Match((const unsigned char*)(int)suffix, 256, (const unsigned char*)(int)_c1, 3);
if (i2) goto l4;
i2 = Strings2__Match((const unsigned char*)(int)suffix, 256, (const unsigned char*)(int)_c2, 3);
if (!(i2)) goto l5;
l4:
i2 = 1;
goto l6;
l5:
i2 = 0;
l6:
if (i2) goto l14;
if (i0) goto l7;
i2 = 0;
goto l15;
l7:
l8:
i0 = (int)pattern + i1;
i2 = *(unsigned char*)i0;
i0 = i2 == 42;
if (i0) goto l9;
i2 = i2 == 63;
if (i2) goto l9;
i2 = 0;
goto l12;
l9:
Strings__Extract((const unsigned char*)(int)pattern, pattern_0d, (short int)i1, (short int)32767, (unsigned char*)(int)suffix, 256);
i2 = Strings2__Match((const unsigned char*)(int)suffix, 256, (const unsigned char*)(int)_c1, 3);
if (i2) goto l10;
i2 = Strings2__Match((const unsigned char*)(int)suffix, 256, (const unsigned char*)(int)_c2, 3);
if (!(i2)) goto l11;
l10:
i2 = 1;
goto l12;
l11:
i2 = 0;
l12:
if (i2) goto l13;
i0 = i1 - 1;
i1 = i0;
l13:
if (i2) goto l15;
i0 = i1 >= 0;
if (i0) goto l8;
goto l15;
l14:
i2 = 1;
l15:
_top_vs = _old_top_vs;
return (unsigned char)i2;
}
unsigned char GenInclude__AddOptions_Duplicate(unsigned char* str, int str_0d, short int *GenInclude__AddOptions_pathCounter, ParamPaths__Path GenInclude__AddOptions_pathArray[256]) {
register int i0, i1, i2, i3;
i0 = *GenInclude__AddOptions_pathCounter;
i2 = i0 - 1;
i0 = i2 >= 0;
if (i0) goto l0;
i3 = 0;
goto l2;
l0:
i0 = 0;
l1:
i3 = (int)_ashl(i0, 2, (unsigned int));
i3 = (int)GenInclude__AddOptions_pathArray + i3;
i3 = (int)*(void**)i3;
i3 += 4;
i3 = (int)*(void**)i3;
i3 = strcmp((const char*) i3, (const char*) (int)str) == 0;
i0++;
if (i3) goto l2;
i1 = i0 <= i2;
if (i1) goto l1;
l2:
return (unsigned char)i3;
}
unsigned char GenInclude__AddOptions_ContainsBlanks(unsigned char* str, int str_0d) {
register int i0, i1, i2, i3;
i2 = *(unsigned char*)(int)str;
i0 = i2 == 0;
if (i0) goto l1;
i1 = i2 == 32;
if (i1) goto l1;
i3 = 0;
l0:
i3++;
i0 = (int)str + i3;
i2 = *(unsigned char*)i0;
i0 = i2 == 0;
if (i0) goto l2;
i2 = i2 != 32;
if (i2) goto l0;
goto l2;
l1:
i3 = 0;
l2:
i0 = (int)str + i3;
i0 = *(unsigned char*)i0;
i0 = i0 == 32;
return (unsigned char)i0;
}
void GenInclude__AddOptions(void(* appCom)(const unsigned char* opt__ref, int opt_0d)) {
register int i0, i1, i2, i3, i4, i5;
Parameter__Filename filename;
ParamPaths__Path pathArray[256];
short int pathCounter;
i0 = (int)ParamPaths__paths;
i0 += 12;
i4 = (int)*(void**)i0;
i0 = i4 == 0;
if (i0) goto l10;
i3 = 0;
l0:
i0 = i4 + 4;
i0 = (int)*(void**)i0;
i1 = *(int*)(i0-8);
i0 = GenInclude__AddOptions_MatchesHeader((const unsigned char*)i0, i1);
if (!(i0)) goto l9;
i5 = i4 + 12;
i0 = (int)*(void**)i5;
i5 = i0 != 0;
if (i5) goto l1;
i2 = i3;
goto l8;
l1:
i2 = i3;
l2:
i5 = i0 + 4;
i1 = (int)*(void**)i5;
i5 = *(int*)(i1-8);
pathCounter = (short int)i2;
i5 = GenInclude__AddOptions_Duplicate((unsigned char*)i1, i5, &pathCounter, pathArray);
if (i5) goto l7;
_string_copy((int)filename, i1, 256);
Filenames__ExpandPath((unsigned char*)(int)filename, 256, (const unsigned char*)(int)filename, 256);
i1 = GenInclude__AddOptions_ContainsBlanks((unsigned char*)(int)filename, 256);
if (i1) goto l3;
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)_c5, 4);
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)filename, 256);
goto l4;
l3:
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)_c3, 5);
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)filename, 256);
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)_c4, 2);
l4:
i1 = i2 < 256;
if (i1) goto l5;
i5 = i2;
goto l6;
l5:
i5 = (int)_ashl(i2, 2, (unsigned int));
i5 = (int)pathArray + i5;
*(void**)i5 = (void*)i0;
i5 = i2 + 1;
l6:
i2 = i5;
l7:
i0 = (int)*(void**)i0;
i5 = i0 != 0;
if (i5) goto l2;
l8:
i3 = i2;
l9:
i4 = (int)*(void**)i4;
i0 = i4 != 0;
if (i0) goto l0;
l10:
((void(*)(const unsigned char*, int opt_0d))(int)appCom)((const unsigned char*)(int)_c6, 5);
}
void GenInclude_init(void) {
_mid = _register_module(&GenInclude_md.md, NULL);
}
|