Rev 2104 | Rev 3056 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 2104 | Rev 2184 | ||
---|---|---|---|
Line 221... | Line 221... | ||
221 | } |
221 | } |
222 | 222 | ||
223 | 223 | ||
224 | void order(const uint64_t val, uint64_t *rv, char *suffix) |
224 | void order(const uint64_t val, uint64_t *rv, char *suffix) |
225 | { |
225 | { |
226 | if (val > 1000000000000000000LL) { |
226 | if (val > 10000000000000000000ULL) { |
- | 227 | *rv = val / 1000000000000000000ULL; |
|
- | 228 | *suffix = 'Z'; |
|
- | 229 | } else if (val > 1000000000000000000ULL) { |
|
227 | *rv = val / 1000000000000000LL; |
230 | *rv = val / 1000000000000000ULL; |
228 | *suffix = 'E'; |
231 | *suffix = 'E'; |
229 | } else if (val > 1000000000000000LL) { |
232 | } else if (val > 1000000000000000ULL) { |
230 | *rv = val / 1000000000000LL; |
233 | *rv = val / 1000000000000ULL; |
231 | *suffix = 'T'; |
234 | *suffix = 'T'; |
232 | } else if (val > 1000000000000LL) { |
235 | } else if (val > 1000000000000ULL) { |
233 | *rv = val / 1000000000LL; |
236 | *rv = val / 1000000000ULL; |
234 | *suffix = 'G'; |
237 | *suffix = 'G'; |
235 | } else if (val > 1000000000LL) { |
238 | } else if (val > 1000000000ULL) { |
236 | *rv = val / 1000000LL; |
239 | *rv = val / 1000000ULL; |
237 | *suffix = 'M'; |
240 | *suffix = 'M'; |
238 | } else if (val > 1000000LL) { |
241 | } else if (val > 1000000ULL) { |
239 | *rv = val / 1000LL; |
242 | *rv = val / 1000ULL; |
240 | *suffix = 'k'; |
243 | *suffix = 'k'; |
241 | } else { |
244 | } else { |
242 | *rv = val; |
245 | *rv = val; |
243 | *suffix = ' '; |
246 | *suffix = ' '; |
244 | } |
247 | } |