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

Function gen_raw

src/gpre/c_cxx.cpp:2684–2711  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2682//
2683
2684static void gen_raw(const UCHAR* blr, int request_length)
2685{
2686 TEXT buffer[80];
2687
2688 TEXT* p = buffer;
2689 const TEXT* const limit = buffer + 60;
2690
2691 for (int count = request_length; count; count--)
2692 {
2693 const TEXT c = *blr++;
2694 if ((c >= 'A' && c <= 'Z') || c == '$' || c == '_')
2695 sprintf(p, "'%c'", c);
2696 else
2697 sprintf(p, "%d", c);
2698 while (*p)
2699 p++;
2700 if (count - 1)
2701 *p++ = ',';
2702 if (p < limit)
2703 continue;
2704 *p = 0;
2705 printa(INDENT, "%s", buffer);
2706 p = buffer;
2707 }
2708
2709 *p = 0;
2710 printa(INDENT, "%s", buffer);
2711}
2712
2713
2714//____________________________________________________________

Callers 1

gen_requestFunction · 0.70

Calls 1

printaFunction · 0.70

Tested by

no test coverage detected