Changeset 1b20da0 in mainline for uspace/app
- Timestamp:
- 2018-02-28T17:52:03Z (8 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3061bc1
- Parents:
- df6ded8
- git-author:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:26:03)
- git-committer:
- Jiří Zárevúcky <zarevucky.jiri@…> (2018-02-28 17:52:03)
- Location:
- uspace/app
- Files:
-
- 32 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/app/bdsh/cmds/modules/cp/cp.c
rdf6ded8 r1b20da0 231 231 /* e.g. cp file_name existing_file */ 232 232 233 /* dest already exists, 233 /* dest already exists, 234 234 * if force is set we will try to remove it. 235 235 * if interactive is set user input is required. … … 414 414 vfs_put(fd1); 415 415 vfs_put(fd2); 416 return -1; 416 return -1; 417 417 } 418 418 … … 486 486 for (c = 0, optreset = 1, optind = 0, opt_ind = 0; c != -1;) { 487 487 c = getopt_long(argc, argv, "hvVfirb:", long_options, &opt_ind); 488 switch (c) { 488 switch (c) { 489 489 case 'h': 490 490 help_cmd_cp(1); -
uspace/app/bdsh/cmds/modules/ls/ls.c
rdf6ded8 r1b20da0 129 129 * 0 otherwise. 130 130 */ 131 static signed int ls_scan_dir(const char *d, DIR *dirp, 131 static signed int ls_scan_dir(const char *d, DIR *dirp, 132 132 struct dir_elem_t **dir_list_ptr) 133 133 { … … 198 198 /* Populate the directory list. */ 199 199 if (ls.recursive) { 200 tmp = (struct dir_elem_t *) realloc(*dir_list_ptr, 200 tmp = (struct dir_elem_t *) realloc(*dir_list_ptr, 201 201 nbdirs * sizeof(struct dir_elem_t)); 202 202 if (!tmp) { 203 203 cli_error(CL_ENOMEM, "ls: failed to scan %s", d); 204 204 goto out; 205 } 205 } 206 206 *dir_list_ptr = tmp; 207 207 … … 253 253 } 254 254 255 nbdirs = ls_scan_dir(path, dirp, &dir_list); 255 nbdirs = ls_scan_dir(path, dirp, &dir_list); 256 256 if (nbdirs == -1) { 257 257 ret = CMD_FAILURE; … … 292 292 ret = CMD_FAILURE; 293 293 goto out; 294 } 294 } 295 295 } 296 296 297 ret = CMD_SUCCESS; 297 ret = CMD_SUCCESS; 298 298 299 299 out: … … 405 405 if (ls.recursive) 406 406 ret = ls_recursive(de.name, dirp); 407 else 407 else 408 408 ret = ls_scan_dir(de.name, dirp, NULL); 409 409 -
uspace/app/bdsh/cmds/modules/printf/printf.c
rdf6ded8 r1b20da0 60 60 61 61 /** Print a formatted data with lib printf. 62 * 62 * 63 63 * Currently available format flags are: 64 64 * '%d' - integer. 65 65 * '%u' - unsigned integer. 66 66 * '%s' - null-terminated string. 67 ***** 67 ***** 68 68 * @param ch formatted flag. 69 69 * @param arg string with data to print. … … 88 88 89 89 /** Process a control character. 90 * 90 * 91 91 * Currently available characters are: 92 92 * '\n' - new line. 93 ***** 93 ***** 94 94 * @param ch Control character. 95 95 */ … … 107 107 108 108 109 /** Prints formatted data. 109 /** Prints formatted data. 110 110 * 111 111 * Accepted format flags: … … 143 143 144 144 case '\\': 145 if (esc_flag) 145 if (esc_flag) 146 146 goto emit; 147 147 esc_flag = true; … … 149 149 150 150 case '%': 151 if (esc_flag) 151 if (esc_flag) 152 152 goto emit; 153 153 ch = str_decode(fmt, &pos, fmt_sz); 154 if (!ch) { 154 if (!ch) { 155 155 putchar('%'); 156 156 break; … … 170 170 break; 171 171 } 172 putchar(ch); 172 putchar(ch); 173 173 break; 174 174 … … 177 177 esc_flag = false; 178 178 } 179 } 179 } 180 180 181 181 return CMD_SUCCESS; -
uspace/app/bdsh/cmds/modules/sleep/sleep.c
rdf6ded8 r1b20da0 92 92 93 93 int ndigits = endptr - nptr; 94 for (; ndigits < 6; ndigits++) 94 for (; ndigits < 6; ndigits++) 95 95 frac_seconds *= 10; 96 96 for (; ndigits > 6; ndigits--) -
uspace/app/bdsh/input.c
rdf6ded8 r1b20da0 107 107 /* Until full support for pipes is implemented, allow for a simple case: 108 108 * [from <file> |] command [| to <file>] 109 * 109 * 110 110 * First find the pipes and check that there are no more 111 111 */ -
uspace/app/bdsh/tok.c
rdf6ded8 r1b20da0 45 45 46 46 /** Initialize the token parser 47 * 47 * 48 48 * @param tok the tokenizer structure to initialize 49 49 * @param input the input string to tokenize … … 53 53 errno_t tok_init(tokenizer_t *tok, char *input, token_t *out_tokens, 54 54 size_t max_tokens) 55 { 55 { 56 56 tok->in = input; 57 57 tok->in_offset = 0; -
uspace/app/df/df.c
rdf6ded8 r1b20da0 185 185 } else { 186 186 /* Block size / Blocks / Used blocks / Available blocks / Used% / Mounted on */ 187 printf(" %10" PRIu32 " %9" PRIu64 " %11" PRIu64 " %11" PRIu64 " %4u%% %s\n", 187 printf(" %10" PRIu32 " %9" PRIu64 " %11" PRIu64 " %11" PRIu64 " %4u%% %s\n", 188 188 st->f_bsize, st->f_blocks, used_blocks, st->f_bfree, 189 189 perc_used, mountpoint); -
uspace/app/edit/edit.c
rdf6ded8 r1b20da0 84 84 keymod_t keymod; 85 85 86 /** 86 /** 87 87 * Ideal column where the caret should try to get. This is used 88 88 * for maintaining the same column during vertical movement. … … 1226 1226 1227 1227 /** Find beginning of a word to the left of spt */ 1228 static spt_t pt_find_word_left(spt_t spt) 1228 static spt_t pt_find_word_left(spt_t spt) 1229 1229 { 1230 1230 do { … … 1235 1235 1236 1236 /** Find beginning of a word to the right of spt */ 1237 static spt_t pt_find_word_right(spt_t spt) 1237 static spt_t pt_find_word_right(spt_t spt) 1238 1238 { 1239 1239 do { … … 1243 1243 } 1244 1244 1245 static void caret_move_word_left(bool select) 1245 static void caret_move_word_left(bool select) 1246 1246 { 1247 1247 spt_t pt; … … 1251 1251 } 1252 1252 1253 static void caret_move_word_right(bool select) 1253 static void caret_move_word_right(bool select) 1254 1254 { 1255 1255 spt_t pt; -
uspace/app/mkbd/main.c
rdf6ded8 r1b20da0 151 151 while (field != NULL) { 152 152 if (field->value != 0) { 153 const char *key_str = 153 const char *key_str = 154 154 usbhid_multimedia_usage_to_str(field->usage); 155 155 printf("Pressed key: %s\n", key_str); … … 158 158 field = usb_hid_report_get_sibling( 159 159 report, field, path, USB_HID_PATH_COMPARE_END 160 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 160 | USB_HID_PATH_COMPARE_USAGE_PAGE_ONLY, 161 161 USB_HID_REPORT_TYPE_INPUT); 162 162 } … … 281 281 while (true) { 282 282 /** @todo Try blocking call. */ 283 rc = usbhid_dev_get_event(dev_sess, event, size, &actual_size, 283 rc = usbhid_dev_get_event(dev_sess, event, size, &actual_size, 284 284 &event_nr, 0); 285 285 if (rc != EOK) { -
uspace/app/mkexfat/exfat.h
rdf6ded8 r1b20da0 79 79 80 80 typedef struct { 81 uint8_t count; /* Always zero */ 81 uint8_t count; /* Always zero */ 82 82 uint16_t checksum; 83 83 uint16_t flags; -
uspace/app/mkexfat/mkexfat.c
rdf6ded8 r1b20da0 330 330 goto exit; 331 331 332 /* Write the Main extended boot sectors backup to disk */ 332 /* Write the Main extended boot sectors backup to disk */ 333 333 rc = ebs_write(service_id, cfg, 334 334 EBS_BACKUP_SECTOR_START, &vbr_checksum); -
uspace/app/mkfat/fat_dentry.h
rdf6ded8 r1b20da0 30 30 /** @addtogroup fs 31 31 * @{ 32 */ 32 */ 33 33 34 34 #ifndef FAT_FAT_DENTRY_H_ -
uspace/app/mkmfs/mkmfs.c
rdf6ded8 r1b20da0 167 167 } 168 168 169 if (sb.block_size < MFS_MIN_BLOCKSIZE || 169 if (sb.block_size < MFS_MIN_BLOCKSIZE || 170 170 sb.block_size > MFS_MAX_BLOCKSIZE) { 171 171 printf(NAME ":Error! Invalid block size.\n"); … … 175 175 printf(NAME ":Error! Invalid block size.\n"); 176 176 exit(0); 177 } else if (sb.block_size > MFS_BLOCKSIZE && 177 } else if (sb.block_size > MFS_BLOCKSIZE && 178 178 sb.fs_version != 3) { 179 179 printf(NAME ":Error! Block size > 1024 is " … … 470 470 if (sb->fs_version == 1) { 471 471 /* Valid only for MFS V1 */ 472 sb->n_zones = sb->dev_nblocks > UINT16_MAX ? 472 sb->n_zones = sb->dev_nblocks > UINT16_MAX ? 473 473 UINT16_MAX : sb->dev_nblocks; 474 474 ind = MFS_BLOCKSIZE / sizeof(uint16_t); … … 524 524 525 525 /* Compute first data zone position */ 526 sb->first_data_zone = 2 + sb->itable_size + 526 sb->first_data_zone = 2 + sb->itable_size + 527 527 sb->zbmap_blocks + sb->ibmap_blocks; 528 528 -
uspace/app/rcubench/rcubench.c
rdf6ded8 r1b20da0 135 135 } 136 136 137 /* 137 /* 138 138 * Run the last thread in place so that we create multiple threads 139 139 * only when needed. Otherwise libc would immediately upgrade … … 193 193 } 194 194 195 static bool parse_cmd_line(int argc, char **argv, bench_t *bench, 195 static bool parse_cmd_line(int argc, char **argv, bench_t *bench, 196 196 const char **err) 197 197 { … … 225 225 *err = "Err: Invalid number of iterations"; 226 226 return false; 227 } 227 } 228 228 229 229 /* Determine thread count. */ … … 236 236 *err = "Err: Invalid number of threads"; 237 237 return false; 238 } 238 } 239 239 240 240 return true; … … 275 275 } 276 276 277 print_res("Completed %" PRIu64 " iterations in %" PRId64 " usecs (%" PRIu64 278 " secs); %" PRIu64 " iters/sec\n", 279 total_iters, duration, secs, iters_per_sec); 277 print_res("Completed %" PRIu64 " iterations in %" PRId64 " usecs (%" PRIu64 278 " secs); %" PRIu64 " iters/sec\n", 279 total_iters, duration, secs, iters_per_sec); 280 280 281 281 close_results(); -
uspace/app/rcutest/rcutest.c
rdf6ded8 r1b20da0 186 186 /*--------------------------------------------------------------------*/ 187 187 188 static bool run_tests(test_info_t *info, bool (*include_filter)(test_desc_t *)) 188 static bool run_tests(test_info_t *info, bool (*include_filter)(test_desc_t *)) 189 189 { 190 190 size_t failed_cnt = 0; … … 214 214 if (failed_cnt) { 215 215 printf("%zu tests failed\n", failed_cnt); 216 } 216 } 217 217 218 218 return 0 == failed_cnt; … … 364 364 if (!info.exited_cs || info.failed) { 365 365 printf("Error: rcu_sync() returned before the reader exited its CS.\n"); 366 /* 367 * Sleep some more so we don't free info on stack while the reader 366 /* 367 * Sleep some more so we don't free info on stack while the reader 368 368 * is using it. 369 369 */ … … 440 440 } 441 441 442 /* 442 /* 443 443 * synching is set when rcu_sync() is about to be entered so wait 444 444 * some more to make sure it really does start executing. … … 459 459 memory_barrier(); 460 460 461 /* 462 * Preexisting reader should have exited by now, so rcu_synchronize() 461 /* 462 * Preexisting reader should have exited by now, so rcu_synchronize() 463 463 * must have returned. 464 464 */ … … 529 529 530 530 if (info.failed) { 531 /* 532 * Sleep some more so we don't free info on stack while readers 531 /* 532 * Sleep some more so we don't free info on stack while readers 533 533 * are using it. 534 534 */ … … 608 608 printf("Error: rcu_deregister_fibril did not unlock the CS.\n"); 609 609 return false; 610 } 610 } 611 611 612 612 return true; … … 672 672 } 673 673 674 /* 674 /* 675 675 * Check if the most recently started rcu_sync of the already 676 676 * finished rcu_syncs did not happen to start after this reader … … 713 713 static bool seq_test(test_info_t *test_info) 714 714 { 715 size_t reader_cnt = test_info->thread_cnt; 716 size_t updater_cnt = test_info->thread_cnt; 715 size_t reader_cnt = test_info->thread_cnt; 716 size_t updater_cnt = test_info->thread_cnt; 717 717 718 718 seq_test_info_t info = { … … 820 820 test_desc_t *t = &test_desc[i]; 821 821 822 if (!t->func) 822 if (!t->func) 823 823 continue; 824 824 … … 870 870 info->thread_cnt = 1; 871 871 printf("Err: Invalid number of threads '%s'; using 1.\n", argv[2]); 872 } 872 } 873 873 } else { 874 874 info->thread_cnt = 1; -
uspace/app/redir/redir.c
rdf6ded8 r1b20da0 158 158 setvbuf(stdout, NULL, _IOLBF, BUFSIZ); 159 159 160 task_wait_t wait; 160 task_wait_t wait; 161 161 task_id_t id = spawn(&wait, argc - i, argv + i); 162 162 -
uspace/app/sbi/src/list.c
rdf6ded8 r1b20da0 258 258 * 259 259 * Unlink node from the list it is currently in. 260 * 260 * 261 261 * @param n Node to unlink from its current list. 262 262 */ -
uspace/app/sbi/src/os/posix.c
rdf6ded8 r1b20da0 48 48 * The string functions are in fact standard C, but would not work under 49 49 * HelenOS. 50 * 50 * 51 51 * XXX String functions used here only work with 8-bit text encoding. 52 52 */ -
uspace/app/sbi/src/parse.c
rdf6ded8 r1b20da0 1500 1500 } 1501 1501 1502 /** Signal a parse error, start bailing out from parser. 1502 /** Signal a parse error, start bailing out from parser. 1503 1503 * 1504 1504 * @param parse Parser object. -
uspace/app/sbi/src/program.c
rdf6ded8 r1b20da0 80 80 } 81 81 82 /** Process sources of the library. 82 /** Process sources of the library. 83 83 * 84 84 * Processes all source files in the library. The list of library source files -
uspace/app/sbi/src/run.c
rdf6ded8 r1b20da0 1433 1433 rdata_value_t *value; 1434 1434 1435 /* 1435 /* 1436 1436 * This can happen when trying to use output of a function which 1437 1437 * does not return a value. … … 1886 1886 break; 1887 1887 case tic_tvref: 1888 /* 1888 /* 1889 1889 * XXX Need to obtain run-time value of type argument to 1890 1890 * initialize variable properly. -
uspace/app/sbi/src/stree.c
rdf6ded8 r1b20da0 695 695 /** Allocate new . 696 696 * 697 * @return New 697 * @return New 698 698 */ 699 699 stree_access_t *stree_access_new(void) -
uspace/app/taskdump/fibrildump.c
rdf6ded8 r1b20da0 47 47 static stacktrace_ops_t fibrildump_st_ops = { 48 48 .read_uintptr = fibrildump_read_uintptr 49 }; 49 }; 50 50 51 51 static errno_t fibrildump_read_uintptr(void *arg, uintptr_t addr, uintptr_t *data) … … 81 81 errno_t rc; 82 82 83 /* 83 /* 84 84 * If we for whatever reason could not obtain symbols table from the binary, 85 85 * we cannot dump fibrils. -
uspace/app/taskdump/taskdump.c
rdf6ded8 r1b20da0 80 80 static stacktrace_ops_t td_stacktrace_ops = { 81 81 .read_uintptr = td_read_uintptr 82 }; 82 }; 83 83 84 84 int main(int argc, char *argv[]) -
uspace/app/tester/mm/malloc2.c
rdf6ded8 r1b20da0 1 1 /* 2 * Copyright (c) 2011 Jakub Jermar 2 * Copyright (c) 2011 Jakub Jermar 3 3 * All rights reserved. 4 4 * -
uspace/app/tester/mm/pager1.c
rdf6ded8 r1b20da0 104 104 touch_area(buffer, buffer_len); 105 105 106 as_area_destroy(buffer); 106 as_area_destroy(buffer); 107 107 vfs_put(fd); 108 108 -
uspace/app/tester/print/print6.c
rdf6ded8 r1b20da0 40 40 const char *warn_str; 41 41 } pat[] = { 42 /* 43 * Generic 42 /* 43 * Generic 44 44 */ 45 45 { 2.0, "%g", "2", 0 }, … … 48 48 { 9e59, "%g", "9e+59", 0 }, 49 49 { -9e-59, "%g", "-9e-59", 0 }, 50 { 1e307, "%g", "1e+307", 0 }, 51 { 0.09999999999999999, "%g", "9.999999999999999e-02", 0 }, 52 { 0.099999999999999999, "%g", "0.1", 0 }, 50 { 1e307, "%g", "1e+307", 0 }, 51 { 0.09999999999999999, "%g", "9.999999999999999e-02", 0 }, 52 { 0.099999999999999999, "%g", "0.1", 0 }, 53 53 54 54 /* … … 56 56 * doubles. 57 57 */ 58 { 3.4567e-317, "%g", "3.4567e-317", "3.456998e-317" }, 59 { 3.4567e-318, "%g", "3.4567e-318", 0 }, 60 { 123456789012345.0, "%g", "123456789012345", 0 }, 61 { -123456789012345.0, "%g", "-123456789012345", 0 }, 58 { 3.4567e-317, "%g", "3.4567e-317", "3.456998e-317" }, 59 { 3.4567e-318, "%g", "3.4567e-318", 0 }, 60 { 123456789012345.0, "%g", "123456789012345", 0 }, 61 { -123456789012345.0, "%g", "-123456789012345", 0 }, 62 62 63 63 /* Special */ 64 { 1e300 * 1e300, "%g", "inf", 0 }, 65 { -1.0 /(1e300 * 1e300), "%g", "-0", 0 }, 66 67 { 1234567.8901, "%g", "1234567.8901", 0 }, 68 { 1234567.80012, "%g", "1234567.80012", 0 }, 69 { 112e-32, "%g", "1.12e-30", 0 }, 70 { 10.0e45, "%g", "1e+46", 0 }, 64 { 1e300 * 1e300, "%g", "inf", 0 }, 65 { -1.0 /(1e300 * 1e300), "%g", "-0", 0 }, 66 67 { 1234567.8901, "%g", "1234567.8901", 0 }, 68 { 1234567.80012, "%g", "1234567.80012", 0 }, 69 { 112e-32, "%g", "1.12e-30", 0 }, 70 { 10.0e45, "%g", "1e+46", 0 }, 71 71 72 72 /* rounding w/ trailing zero removal */ 73 { 0.01, "%10.6g", " 0.01", 0 }, 74 { 9.495, "%10.2g", " 9.5", 0 }, 75 { 9.495e30, "%10.2g", " 9.5e+30", 0 }, 76 { 9.495e30, "%10g", " 9.495e+30", 0 }, 77 { 9.495e30, "%10.6g", " 9.495e+30", 0 }, 78 79 /* 80 * Scientific 81 */ 82 { 1e05, "%e", "1.000000e+05", 0 }, 73 { 0.01, "%10.6g", " 0.01", 0 }, 74 { 9.495, "%10.2g", " 9.5", 0 }, 75 { 9.495e30, "%10.2g", " 9.5e+30", 0 }, 76 { 9.495e30, "%10g", " 9.495e+30", 0 }, 77 { 9.495e30, "%10.6g", " 9.495e+30", 0 }, 78 79 /* 80 * Scientific 81 */ 82 { 1e05, "%e", "1.000000e+05", 0 }, 83 83 84 84 /* full padding */ … … 86 86 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */ 87 87 { 1e-1, "%+010.3e", "+1.000e-01", 0 }, 88 { 1e-1, "%+10.3e", "+1.000e-01", 0 }, 88 { 1e-1, "%+10.3e", "+1.000e-01", 0 }, 89 89 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */ 90 90 { 1e-1, "%+-10.3e", "+1.000e-01", 0 }, … … 94 94 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */ 95 95 { 1e-1, "%+010.2e", "+01.00e-01", 0 }, 96 { 1e-1, "%+10.2e", " +1.00e-01", 0 }, 96 { 1e-1, "%+10.2e", " +1.00e-01", 0 }, 97 97 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_LEFTALIGNED */ 98 98 { 1e-1, "%+-10.2e", "+1.00e-01 ", 0 }, … … 103 103 /* __PRINTF_FLAG_SPACESIGN */ 104 104 { 1e-1, "% 10.2e", " 1.00e-01", 0 }, 105 { 1e-1, "%10.2e", " 1.00e-01", 0 }, 105 { 1e-1, "%10.2e", " 1.00e-01", 0 }, 106 106 107 107 /* padding fractionals */ … … 109 109 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */ 110 110 { 1.08e29, "%+010.3e", "+1.080e+29", 0 }, 111 { 1.08e29, "%+10.3e", "+1.080e+29", 0 }, 111 { 1.08e29, "%+10.3e", "+1.080e+29", 0 }, 112 112 /* __PRINTF_FLAG_SHOWPLUS | __PRINTF_FLAG_ZEROPADDED */ 113 113 { 1.08e29, "%+011.2e", "+001.08e+29", 0 }, 114 { 1.085e29, "%11.2e", " 1.09e+29", 0 }, 114 { 1.085e29, "%11.2e", " 1.09e+29", 0 }, 115 115 116 116 /* rounding */ 117 117 118 { 1.345e2, "%+10.2e", " +1.35e+02", 0 }, 119 { 9.995e2, "%+10.2e", " +1.00e+03", 0 }, 120 { -9.99499999e2, "%10.2e", " -9.99e+02", 0 }, 121 { -9.99499999e2, "%10.0e", " -1e+03", 0 }, 118 { 1.345e2, "%+10.2e", " +1.35e+02", 0 }, 119 { 9.995e2, "%+10.2e", " +1.00e+03", 0 }, 120 { -9.99499999e2, "%10.2e", " -9.99e+02", 0 }, 121 { -9.99499999e2, "%10.0e", " -1e+03", 0 }, 122 122 /* __PRINTF_FLAG_DECIMALPT */ 123 123 { -9.99499999e2, "%#10.0e", " -1.e+03", 0 }, … … 129 129 /* special */ 130 130 131 { 1e300 * 1e300, "%10.5e", " inf", 0 }, 132 { -1.0 /(1e300 * 1e300), "%10.2e", " -0.00e+00", 0 }, 131 { 1e300 * 1e300, "%10.5e", " inf", 0 }, 132 { -1.0 /(1e300 * 1e300), "%10.2e", " -0.00e+00", 0 }, 133 133 /* __PRINTF_FLAG_BIGCHARS */ 134 134 { 1e300 * 1e300, "%10.5E", " INF", 0 }, … … 151 151 /* __PRINTF_FLAG_SPACESIGN | __PRINTF_FLAG_ZEROPADDED */ 152 152 { 1e-1, "% 010.3f", " 00000.100", 0 }, 153 { 1e-1, "%10.3f", " 0.100", 0 }, 153 { 1e-1, "%10.3f", " 0.100", 0 }, 154 154 155 155 /* rounding */ 156 156 157 { -0.0, "%10.0f", " -0", 0 }, 158 { -0.099, "%+10.3f", " -0.099", 0 }, 159 { -0.0995, "%+10.3f", " -0.100", 0 }, 160 { -0.0994, "%+10.3f", " -0.099", 0 }, 161 { -99.995, "%+10.0f", " -100", 0 }, 162 { 3.5, "%+10.30f", "+3.500000000000000000000000000000", 0 }, 163 { 3.5, "%+10.0f", " +4", 0 }, 164 { 0.1, "%+10.6f", " +0.100000", 0 }, 157 { -0.0, "%10.0f", " -0", 0 }, 158 { -0.099, "%+10.3f", " -0.099", 0 }, 159 { -0.0995, "%+10.3f", " -0.100", 0 }, 160 { -0.0994, "%+10.3f", " -0.099", 0 }, 161 { -99.995, "%+10.0f", " -100", 0 }, 162 { 3.5, "%+10.30f", "+3.500000000000000000000000000000", 0 }, 163 { 3.5, "%+10.0f", " +4", 0 }, 164 { 0.1, "%+10.6f", " +0.100000", 0 }, 165 165 166 166 /* … … 168 168 * 0.09..917 169 169 */ 170 { 0.1, "%+10.20f", "+0.10000000000000000550", 0 }, 170 { 0.1, "%+10.20f", "+0.10000000000000000550", 0 }, 171 171 /* Next closest to 0.1 */ 172 172 { 0.0999999999999999917, "%+10.20f", "+0.09999999999999999170", 173 0 }, 173 0 }, 174 174 { 0.0999999999999999917, "%+10f", " +0.100000", 0 }, 175 175 { 0.0999999999999998945, "%10.20f", "0.09999999999999989450", 176 0 }, 176 0 }, 177 177 }; 178 178 -
uspace/app/testread/testread.c
rdf6ded8 r1b20da0 172 172 uint32_t total_run_time = final_time.tv_sec - start_time.tv_sec; 173 173 if (total_run_time > 0) { 174 printf("total bytes: %" PRIuOFF64 174 printf("total bytes: %" PRIuOFF64 175 175 ", total time: %u s, avg speed: %" PRIuOFF64 " B/s\n", 176 176 offset, -
uspace/app/tetris/tetris.c
rdf6ded8 r1b20da0 174 174 } 175 175 176 static void tetris_menu_draw(int level) 176 static void tetris_menu_draw(int level) 177 177 { 178 178 clear_screen(); -
uspace/app/trace/proto.c
rdf6ded8 r1b20da0 173 173 mo->oper = oper; 174 174 175 hash_table_insert(&proto->method_oper, &mo->link); 175 hash_table_insert(&proto->method_oper, &mo->link); 176 176 } 177 177 -
uspace/app/trace/trace.c
rdf6ded8 r1b20da0 678 678 V_INTEGER, 679 679 V_INTEGER, 680 V_INTEGER 680 V_INTEGER 681 681 }; 682 682 -
uspace/app/vcalc/vcalc.c
rdf6ded8 r1b20da0 576 576 grid->add(grid, &btn_c->widget, 0, 4, 1, 1); 577 577 grid->add(grid, &btn_0->widget, 1, 4, 1, 1); 578 grid->add(grid, &btn_eval->widget, 2, 4, 1, 1); 578 grid->add(grid, &btn_eval->widget, 2, 4, 1, 1); 579 579 grid->add(grid, &btn_div->widget, 3, 4, 1, 1); 580 580
Note:
See TracChangeset
for help on using the changeset viewer.