Changeset 338d54a7 in mainline for uspace/app/top/screen.c
- Timestamp:
- 2018-03-10T22:55:07Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 850fd32
- Parents:
- 5ef16903
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/top/screen.c
r5ef16903 r338d54a7 390 390 int width = table->columns[column_index].width; 391 391 field_t *field = &table->fields[i]; 392 uint64_t val; 393 const char *psuffix; 394 char suffix; 392 395 393 396 if (column_index != 0) { … … 407 410 printf("%*" PRIu64, width, field->uint); 408 411 break; 409 case FIELD_UINT_SUFFIX_BIN: { 410 uint64_t val = field->uint; 411 const char *suffix; 412 case FIELD_UINT_SUFFIX_BIN: 413 val = field->uint; 412 414 width -= 3; 413 bin_order_suffix(val, &val, &suffix, true); 414 printf("%*" PRIu64 "%s", width, val, suffix); 415 break; 416 } 417 case FIELD_UINT_SUFFIX_DEC: { 418 uint64_t val = field->uint; 419 char suffix; 415 bin_order_suffix(val, &val, &psuffix, true); 416 printf("%*" PRIu64 "%s", width, val, psuffix); 417 break; 418 case FIELD_UINT_SUFFIX_DEC: 419 val = field->uint; 420 420 width -= 1; 421 421 order_suffix(val, &val, &suffix); 422 422 printf("%*" PRIu64 "%c", width, val, suffix); 423 423 break; 424 }425 424 case FIELD_PERCENT: 426 425 width -= 5; /* nnn.% */
Note:
See TracChangeset
for help on using the changeset viewer.