MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / gen_raw

Function gen_raw

src/gpre/languages/pas.cpp:2336–2363  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2334//
2335
2336static void gen_raw(const UCHAR* blr, int request_length) //, int column)
2337{
2338 TEXT buffer[80];
2339
2340 TEXT* p = buffer;
2341 const TEXT* const limit = buffer + 60;
2342
2343 for (const UCHAR* const end = blr + request_length - 1; blr <= end; blr++)
2344 {
2345 const UCHAR c = *blr;
2346 if ((c >= 'A' && c <= 'Z') || c == '$' || c == '_')
2347 sprintf(p, "'%c'", c);
2348 else
2349 sprintf(p, "chr(%d)", c);
2350 while (*p)
2351 p++;
2352 if (blr != end)
2353 *p++ = ',';
2354 if (p < limit)
2355 continue;
2356 *p = 0;
2357 printa(INDENT, buffer);
2358 p = buffer;
2359 }
2360
2361 *p = 0;
2362 printa(INDENT, buffer);
2363}
2364
2365
2366//____________________________________________________________

Callers 1

gen_requestFunction · 0.70

Calls 1

printaFunction · 0.70

Tested by

no test coverage detected