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

Function process_dbl_arg

strings/my_vsnprintf.c:227–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225*/
226
227static char *process_dbl_arg(char *to, char *end, size_t width,
228 double par, char arg_type)
229{
230 if (width == SIZE_T_MAX)
231 width= FLT_DIG; /* width not set, use default */
232 else if (width >= NOT_FIXED_DEC)
233 width= NOT_FIXED_DEC - 1; /* max.precision for my_fcvt() */
234 width= MY_MIN(width, (size_t)(end-to) - 1);
235
236 if (arg_type == 'f')
237 to+= my_fcvt(par, (int)width , to, NULL);
238 else
239 to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
240 return to;
241}
242
243
244/**

Callers 2

process_argsFunction · 0.85
my_vsnprintf_exFunction · 0.85

Calls 2

my_fcvtFunction · 0.85
my_gcvtFunction · 0.85

Tested by

no test coverage detected