MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / print_escaped_string

Function print_escaped_string

extra/comp_err.c:230–247  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228
229
230static void print_escaped_string(FILE *f, const char *str)
231{
232 const char *tmp = str;
233
234 while (tmp[0] != 0)
235 {
236 switch (tmp[0])
237 {
238 case '\\': fprintf(f, "\\\\"); break;
239 case '\'': fprintf(f, "\\\'"); break;
240 case '\"': fprintf(f, "\\\""); break;
241 case '\n': fprintf(f, "\\n"); break;
242 case '\r': fprintf(f, "\\r"); break;
243 default: fprintf(f, "%c", tmp[0]);
244 }
245 tmp++;
246 }
247}
248
249
250static int create_header_files(struct errors *error_head)

Callers 1

create_header_filesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected