Convert and output the given field. If it is not included in the set of fields to process just output the original */
| 1447 | /* Convert and output the given field. If it is not included in the set |
| 1448 | of fields to process just output the original */ |
| 1449 | static bool |
| 1450 | process_field (char *text, uintmax_t field) |
| 1451 | { |
| 1452 | long double val = 0; |
| 1453 | size_t precision = 0; |
| 1454 | bool valid_number = true; |
| 1455 | |
| 1456 | if (include_field (field)) |
| 1457 | { |
| 1458 | valid_number = |
| 1459 | process_suffixed_number (text, &val, &precision, field); |
| 1460 | |
| 1461 | intmax_t padding; |
| 1462 | if (valid_number) |
| 1463 | valid_number = prepare_padded_number (val, precision, &padding); |
| 1464 | |
| 1465 | if (valid_number) |
| 1466 | print_padded_number (padding); |
| 1467 | else |
| 1468 | fputs (text, stdout); |
| 1469 | } |
| 1470 | else |
| 1471 | fputs (text, stdout); |
| 1472 | |
| 1473 | return valid_number; |
| 1474 | } |
| 1475 | |
| 1476 | /* Convert number in a given line of text. |
| 1477 | NEWLINE specifies whether to output a '\n' for this "line". */ |
no test coverage detected