MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / RAW_escape

Function RAW_escape

tools/tokenizer/libtoken.c:1193–1203  ·  view source on GitHub ↗

Escape hard newlines in a string.

Source from the content-addressed store, hash-verified

1191
1192// Escape hard newlines in a string.
1193void RAW_escape(FILE *out, const char *token)
1194{
1195 const char *p;
1196 for (p = token; *p; p++) {
1197 if (*p == '\n') {
1198 fputs("\\n", out);
1199 continue;
1200 }
1201 fputc(*p, out);
1202 }
1203}
1204
1205// Escape token for output as CSV string.
1206void CSV_escape(FILE *out, const char *token)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected