| 1369 | } |
| 1370 | |
| 1371 | void fxWriteResult(FILE* file, txResult* result, int c) |
| 1372 | { |
| 1373 | int i = 0; |
| 1374 | while (i < c) { |
| 1375 | fprintf(file, " "); |
| 1376 | i++; |
| 1377 | } |
| 1378 | if (result->file.flag < 0) { |
| 1379 | char buffer[16]; |
| 1380 | char *p = result->path + result->file.offset, *q; |
| 1381 | fprintf(file, "- %s: \"", result->path); |
| 1382 | while (((p = mxStringByteDecode(p, &c))) && (c != C_EOF)) { |
| 1383 | q = buffer; |
| 1384 | if ((c == '\\') || (c == '"')) { |
| 1385 | q = fxUTF8Encode(q, '\\'); |
| 1386 | q = fxUTF8Encode(q, c); |
| 1387 | } |
| 1388 | else if ((0xD800 <= c) && (c <= 0xDFFF)) |
| 1389 | q = fxUTF8Encode(q, 0xFFFD); |
| 1390 | else |
| 1391 | q = fxUTF8Encode(q, c); |
| 1392 | *q = 0; |
| 1393 | fprintf(file, "%s", buffer); |
| 1394 | } |
| 1395 | fprintf(file, "\"\n"); |
| 1396 | } |
| 1397 | else { |
| 1398 | fprintf(file, "- %s:\n", result->path); |
| 1399 | c++; |
| 1400 | result = result->first; |
| 1401 | while (result) { |
| 1402 | fxWriteResult(file, result, c + 1); |
| 1403 | result = result->next; |
| 1404 | } |
| 1405 | } |
| 1406 | } |
| 1407 | |
| 1408 | void fxBuildCompartmentGlobals(txMachine* the) |
| 1409 | { |
no test coverage detected