MCPcopy Create free account
hub / github.com/coreutils/coreutils / default_scale_base

Function default_scale_base

src/numfmt.c:221–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219}
220
221static inline int
222default_scale_base (enum scale_type scale)
223{
224 switch (scale)
225 {
226 case scale_IEC:
227 case scale_IEC_I:
228 return 1024;
229
230 case scale_none:
231 case scale_auto:
232 case scale_SI:
233 default:
234 return 1000;
235 }
236}
237
238static char const zero_and_valid_suffixes[] = "0KkMGTPEZYRQ";
239static char const *valid_suffixes = 1 + zero_and_valid_suffixes;

Callers 2

simple_strtod_humanFunction · 0.85
double_to_humanFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected