Changes in uspace/app/tester/console/console1.c [7c014d1:9f1362d4] in mainline
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/tester/console/console1.c
r7c014d1 r9f1362d4 50 50 { 51 51 if (!test_quiet) { 52 console_ctrl_t *console = console_init(stdin, stdout);53 54 52 printf("Style test: "); 55 console_flush(console);56 console_set_style( console, STYLE_NORMAL);53 fflush(stdout); 54 console_set_style(fphone(stdout), STYLE_NORMAL); 57 55 printf(" normal "); 58 console_flush(console);59 console_set_style( console, STYLE_EMPHASIS);56 fflush(stdout); 57 console_set_style(fphone(stdout), STYLE_EMPHASIS); 60 58 printf(" emphasized "); 61 console_flush(console);62 console_set_style( console, STYLE_INVERTED);59 fflush(stdout); 60 console_set_style(fphone(stdout), STYLE_INVERTED); 63 61 printf(" inverted "); 64 console_flush(console);65 console_set_style( console, STYLE_SELECTED);62 fflush(stdout); 63 console_set_style(fphone(stdout), STYLE_SELECTED); 66 64 printf(" selected "); 67 console_flush(console);68 console_set_style( console, STYLE_NORMAL);65 fflush(stdout); 66 console_set_style(fphone(stdout), STYLE_NORMAL); 69 67 printf("\n"); 70 68 … … 75 73 for (j = 0; j < 2; j++) { 76 74 for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) { 77 console_flush(console);78 console_set_color( console, COLOR_WHITE, i,75 fflush(stdout); 76 console_set_color(fphone(stdout), i, COLOR_WHITE, 79 77 j ? CATTR_BRIGHT : 0); 80 78 printf(" %s ", color_name[i]); 81 79 } 82 console_flush(console);83 console_set_style( console, STYLE_NORMAL);80 fflush(stdout); 81 console_set_style(fphone(stdout), STYLE_NORMAL); 84 82 putchar('\n'); 85 83 } … … 88 86 for (j = 0; j < 2; j++) { 89 87 for (i = COLOR_BLACK; i <= COLOR_WHITE; i++) { 90 console_flush(console);91 console_set_color( console, i, COLOR_WHITE,88 fflush(stdout); 89 console_set_color(fphone(stdout), COLOR_WHITE, i, 92 90 j ? CATTR_BRIGHT : 0); 93 91 printf(" %s ", color_name[i]); 94 92 } 95 console_flush(console);96 console_set_style( console, STYLE_NORMAL);93 fflush(stdout); 94 console_set_style(fphone(stdout), STYLE_NORMAL); 97 95 putchar('\n'); 98 96 } … … 101 99 102 100 for (i = 0; i < 255; i += 16) { 103 console_flush(console);104 console_set_rgb_color( console, i << 16, (255 - i)<< 16);101 fflush(stdout); 102 console_set_rgb_color(fphone(stdout), (255 - i) << 16, i << 16); 105 103 putchar('X'); 106 104 } 107 console_flush(console);108 console_set_color( console, COLOR_WHITE, COLOR_BLACK, 0);105 fflush(stdout); 106 console_set_color(fphone(stdout), COLOR_BLACK, COLOR_WHITE, 0); 109 107 putchar('\n'); 110 108 111 109 for (i = 0; i < 255; i += 16) { 112 console_flush(console);113 console_set_rgb_color( console, i << 8, (255 - i)<< 8);110 fflush(stdout); 111 console_set_rgb_color(fphone(stdout), (255 - i) << 8, i << 8); 114 112 putchar('X'); 115 113 } 116 console_flush(console);117 console_set_color( console, COLOR_WHITE, COLOR_BLACK, 0);114 fflush(stdout); 115 console_set_color(fphone(stdout), COLOR_BLACK, COLOR_WHITE, 0); 118 116 putchar('\n'); 119 117 120 118 for (i = 0; i < 255; i += 16) { 121 console_flush(console);122 console_set_rgb_color( console, i, 255 -i);119 fflush(stdout); 120 console_set_rgb_color(fphone(stdout), 255 - i, i); 123 121 putchar('X'); 124 122 } 125 console_flush(console);126 console_set_style( console, STYLE_NORMAL);123 fflush(stdout); 124 console_set_style(fphone(stdout), STYLE_NORMAL); 127 125 putchar('\n'); 128 126 }
Note:
See TracChangeset
for help on using the changeset viewer.