MCPcopy Create free account
hub / github.com/MariaDB/server / process_dbl_arg

Function process_dbl_arg

strings/my_vsnprintf.c:302–316  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

300*/
301
302static char *process_dbl_arg(char *to, char *end, size_t width,
303 double par, char arg_type)
304{
305 if (width == MAX_WIDTH)
306 width= FLT_DIG; /* width not set, use default */
307 else if (width >= FLOATING_POINT_DECIMALS)
308 width= FLOATING_POINT_DECIMALS - 1; /* max.precision for my_fcvt() */
309 width= MY_MIN(width, (size_t)(end-to) - 1);
310
311 if (arg_type == 'f')
312 to+= my_fcvt(par, (int)width , to, NULL);
313 else
314 to+= my_gcvt(par, MY_GCVT_ARG_DOUBLE, (int) width , to, NULL);
315 return to;
316}
317
318
319/**

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