Changeset 338d54a7 in mainline for uspace/dist/src/c/demos/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/dist/src/c/demos/top/screen.c
r5ef16903 r338d54a7 45 45 #include <inttypes.h> 46 46 #include <macros.h> 47 #include <str.h> 47 48 #include "screen.h" 48 49 #include "top.h" … … 389 390 int width = table->columns[column_index].width; 390 391 field_t *field = &table->fields[i]; 392 uint64_t val; 393 const char *psuffix; 394 char suffix; 391 395 392 396 if (column_index != 0) { … … 406 410 printf("%*" PRIu64, width, field->uint); 407 411 break; 408 case FIELD_UINT_SUFFIX_BIN: { 409 uint64_t val = field->uint; 410 const char *suffix; 412 case FIELD_UINT_SUFFIX_BIN: 413 val = field->uint; 411 414 width -= 3; 412 bin_order_suffix(val, &val, &suffix, true); 413 printf("%*" PRIu64 "%s", width, val, suffix); 414 break; 415 } 416 case FIELD_UINT_SUFFIX_DEC: { 417 uint64_t val = field->uint; 418 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; 419 420 width -= 1; 420 421 order_suffix(val, &val, &suffix); 421 422 printf("%*" PRIu64 "%c", width, val, suffix); 422 423 break; 423 }424 424 case FIELD_PERCENT: 425 425 width -= 5; /* nnn.% */ … … 537 537 * 538 538 */ 539 errno_t tgetchar(unsigned int sec)539 int tgetchar(unsigned int sec) 540 540 { 541 541 /*
Note:
See TracChangeset
for help on using the changeset viewer.