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