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

Function fxWriteCString

xs/tools/xslBase.c:938–954  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

936}
937
938void fxWriteCString(FILE* file, txString string)
939{
940 unsigned char c;
941 fprintf(file, "\"");
942 while ((c = *((unsigned char *)string))) {
943 if (c == '\\')
944 fprintf(file, "\\\\");
945 else if (c == '"')
946 fprintf(file, "\\\"");
947 else if ((32 <= c) && (c < 128))
948 fprintf(file, "%c", (char)c);
949 else
950 fprintf(file, "\\x%.2x\"\"", c);
951 string++;
952 }
953 fprintf(file, "\"");
954}
955
956void fxWriteDefines(txLinker* linker, FILE* file)
957{

Callers 2

fxPrintSlotFunction · 0.85
fxWriteScriptRecordFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected