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

Function process_str_arg

strings/my_vsnprintf.c:187–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

185*/
186
187static char *process_str_arg(const CHARSET_INFO *cs, char *to, char *end,
188 size_t width, char *par, uint print_type)
189{
190 int well_formed_error;
191 size_t plen, left_len= (size_t) (end - to) + 1;
192 if (!par)
193 par = (char*) "(null)";
194
195 plen= strnlen(par, width);
196 if (left_len <= plen)
197 plen = left_len - 1;
198 plen= cs->cset->well_formed_len(cs, par, par + plen,
199 width, &well_formed_error);
200 if (print_type & ESCAPED_ARG)
201 to= backtick_string(cs, to, end, par, plen, '`');
202 else
203 to= strnmov(to,par,plen);
204 return to;
205}
206
207
208/**

Callers 2

process_argsFunction · 0.85
my_vsnprintf_exFunction · 0.85

Calls 3

strnlenFunction · 0.85
backtick_stringFunction · 0.85
strnmovFunction · 0.85

Tested by

no test coverage detected