MCPcopy Create free account
hub / github.com/Moddable-OpenSource/moddable / fxWriteResult

Function fxWriteResult

xs/tools/xst262.c:1371–1406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1369}
1370
1371void 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
1408void fxBuildCompartmentGlobals(txMachine* the)
1409{

Callers 1

fxWriteConfigurationFunction · 0.85

Calls 1

fxUTF8EncodeFunction · 0.85

Tested by

no test coverage detected