Changeset 1abcf1d in mainline
- Timestamp:
- 2018-04-10T19:43:21Z (7 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- a69d42e
- Parents:
- 9fa14d8d
- Files:
-
- 13 edited
Legend:
- Unmodified
- Added
- Removed
-
boot/generic/src/vprintf.c
r9fa14d8d r1abcf1d 60 60 } 61 61 62 putchar('\n'); 62 63 return chars; 63 64 } -
kernel/generic/src/printf/vprintf.c
r9fa14d8d r1abcf1d 79 79 } 80 80 81 putchar('\n'); 81 82 return chars; 82 83 } -
uspace/app/bdsh/cmds/modules/cat/cat.c
r9fa14d8d r1abcf1d 353 353 case 'H': 354 354 if (!optarg || str_uint64_t(optarg, NULL, 10, false, &head) != EOK) { 355 puts("Invalid head size \n");355 puts("Invalid head size"); 356 356 return CMD_FAILURE; 357 357 } … … 359 359 case 't': 360 360 if (!optarg || str_uint64_t(optarg, NULL, 10, false, &tail) != EOK) { 361 puts("Invalid tail size \n");361 puts("Invalid tail size"); 362 362 return CMD_FAILURE; 363 363 } … … 367 367 case 'b': 368 368 if (!optarg || str_size_t(optarg, NULL, 10, false, &buffer) != EOK) { 369 puts("Invalid buffer size \n");369 puts("Invalid buffer size"); 370 370 return CMD_FAILURE; 371 371 } -
uspace/app/tetris/scores.c
r9fa14d8d r1abcf1d 128 128 clear_screen(); 129 129 moveto(10, 10); 130 puts("Insert your name: ");130 fputs("Insert your name: ", stdout); 131 131 str_cpy(scores[NUMSPOTS - 1].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, 132 132 "Player"); -
uspace/app/tetris/tetris.c
r9fa14d8d r1abcf1d 179 179 clear_screen(); 180 180 moveto(5, 10); 181 puts("Tetris\n \n");181 puts("Tetris\n"); 182 182 183 183 moveto(8, 10); … … 194 194 printf("In game controls:"); 195 195 moveto(21, 0); 196 p uts(key_msg);196 printf("%s", key_msg); 197 197 } 198 198 -
uspace/app/tmon/main.c
r9fa14d8d r1abcf1d 127 127 static void print_usage(char *app_name) 128 128 { 129 puts(NAME ": benchmark USB diagnostic device\n \n");129 puts(NAME ": benchmark USB diagnostic device\n"); 130 130 printf("Usage: %s command [device] [options]\n\n", app_name); 131 131 … … 134 134 } 135 135 136 puts(" \n");136 puts(""); 137 137 for (unsigned i = 0; i < ARRAY_SIZE(options); ++i) { 138 138 printf(INDENT "-%c --%s\n" INDENT INDENT "%s\n", options[i].short_name, options[i].long_name, options[i].description); 139 139 } 140 140 141 puts("\nIf no device is specified, the first device is used provided that it is the only one connected. Otherwise, the command fails.\n \n");141 puts("\nIf no device is specified, the first device is used provided that it is the only one connected. Otherwise, the command fails.\n"); 142 142 } 143 143 -
uspace/app/tmon/tests.c
r9fa14d8d r1abcf1d 94 94 case 't': 95 95 if (!optarg || str_uint32_t(optarg, NULL, 10, false, &duration_uint) != EOK) { 96 puts(NAME ": Invalid duration. \n");96 puts(NAME ": Invalid duration."); 97 97 rc = EINVAL; 98 98 goto err_malloc; … … 102 102 case 's': 103 103 if (!optarg || str_size_t(optarg, NULL, 10, false, &p->transfer_size) != EOK) { 104 puts(NAME ": Invalid data size. \n");104 puts(NAME ": Invalid data size."); 105 105 rc = EINVAL; 106 106 goto err_malloc; … … 182 182 const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params; 183 183 print_params(params); 184 puts("\nTesting... ");184 fputs("\nTesting... ", stdout); 185 185 186 186 usbdiag_test_results_t results; 187 187 errno_t rc = usbdiag_test_in(exch, params, &results); 188 188 if (rc != EOK) { 189 puts("failed \n");189 puts("failed"); 190 190 printf(NAME ": %s\n", str_error(rc)); 191 191 return 1; 192 192 } 193 193 194 puts("succeeded\n \n");194 puts("succeeded\n"); 195 195 print_results(params, &results); 196 196 return 0; … … 207 207 const usbdiag_test_params_t *params = (usbdiag_test_params_t *) generic_params; 208 208 print_params(params); 209 puts("\nTesting... ");209 fputs("\nTesting... ", stdout); 210 210 211 211 usbdiag_test_results_t results; 212 212 errno_t rc = usbdiag_test_out(exch, params, &results); 213 213 if (rc) { 214 puts("failed \n");214 puts("failed"); 215 215 printf(NAME ": %s\n", str_error(rc)); 216 216 return 1; 217 217 } 218 218 219 puts("succeeded\n \n");219 puts("succeeded\n"); 220 220 print_results(params, &results); 221 221 return 0; -
uspace/app/top/screen.c
r9fa14d8d r1abcf1d 120 120 sysarg_t i; 121 121 for (i = c + 1; i < cols; i++) 122 puts(" ");122 fputs(" ", stdout); 123 123 124 124 if (r + 1 < rows) 125 puts(" \n");125 puts(""); 126 126 } 127 127 … … 187 187 size_t i; 188 188 for (i = 0; i < data->load_count; i++) { 189 puts(" ");189 fputs(" ", stdout); 190 190 stats_print_load_fragment(data->load[i], 2); 191 191 } … … 259 259 data->cpus[i].id, data->cpus[i].frequency_mhz, 260 260 busy, busy_suffix, idle, idle_suffix); 261 puts(", idle: ");261 fputs(", idle: ", stdout); 262 262 print_percent(data->cpus_perc[i].idle, 2); 263 puts(", busy: ");263 fputs(", busy: ", stdout); 264 264 print_percent(data->cpus_perc[i].busy, 2); 265 265 } else … … 361 361 int width = table->columns[i].width; 362 362 if (i != 0) { 363 puts(" ");363 fputs(" ", stdout); 364 364 } 365 365 if (width == 0) { … … 395 395 396 396 if (column_index != 0) { 397 puts(" ");397 fputs(" ", stdout); 398 398 } 399 399 -
uspace/dist/src/c/demos/tetris/scores.c
r9fa14d8d r1abcf1d 129 129 clear_screen(); 130 130 moveto(10, 10); 131 puts("Insert your name: ");131 fputs("Insert your name: ", stdout); 132 132 str_cpy(scores[NUMSPOTS - 1].hs_name, STR_BOUNDS(MAXLOGNAME) + 1, 133 133 "Player"); -
uspace/dist/src/c/demos/tetris/tetris.c
r9fa14d8d r1abcf1d 180 180 clear_screen(); 181 181 moveto(5, 10); 182 puts("Tetris\n \n");182 puts("Tetris\n"); 183 183 184 184 moveto(8, 10); -
uspace/dist/src/c/demos/top/screen.c
r9fa14d8d r1abcf1d 120 120 sysarg_t i; 121 121 for (i = c + 1; i < cols; i++) 122 puts(" ");122 fputs(" ", stdout); 123 123 124 124 if (r + 1 < rows) 125 puts(" \n");125 puts(""); 126 126 } 127 127 … … 187 187 size_t i; 188 188 for (i = 0; i < data->load_count; i++) { 189 puts(" ");189 fputs(" ", stdout); 190 190 stats_print_load_fragment(data->load[i], 2); 191 191 } … … 259 259 data->cpus[i].id, data->cpus[i].frequency_mhz, 260 260 busy, busy_suffix, idle, idle_suffix); 261 puts(", idle: ");261 fputs(", idle: ", stdout); 262 262 print_percent(data->cpus_perc[i].idle, 2); 263 puts(", busy: ");263 fputs(", busy: ", stdout); 264 264 print_percent(data->cpus_perc[i].busy, 2); 265 265 } else … … 361 361 int width = table->columns[i].width; 362 362 if (i != 0) { 363 puts(" ");363 fputs(" ", stdout); 364 364 } 365 365 if (width == 0) { … … 395 395 396 396 if (column_index != 0) { 397 puts(" ");397 fputs(" ", stdout); 398 398 } 399 399 -
uspace/lib/c/generic/io/io.c
r9fa14d8d r1abcf1d 733 733 int puts(const char *str) 734 734 { 735 return fputs(str, stdout); 735 if (fputs(str, stdout) < 0) 736 return EOF; 737 return putchar('\n'); 736 738 } 737 739 -
uspace/lib/c/include/stdio.h
r9fa14d8d r1abcf1d 76 76 extern int fputs(const char *, FILE *); 77 77 78 // FIXME: putchar and fputc are byte-oriented. 79 // They shouldn't accept wide characters. 78 80 extern int putchar(wchar_t); 79 81 extern int puts(const char *);
Note:
See TracChangeset
for help on using the changeset viewer.