| 734 | |
| 735 | |
| 736 | static void |
| 737 | simple_strtod_fatal (enum simple_strtod_error err, char const *input_str) |
| 738 | { |
| 739 | char const *msgid = NULL; |
| 740 | |
| 741 | switch (err) |
| 742 | { |
| 743 | case SSE_OK_PRECISION_LOSS: |
| 744 | case SSE_OK: |
| 745 | /* should never happen - this function isn't called when OK. */ |
| 746 | unreachable (); |
| 747 | |
| 748 | case SSE_OVERFLOW: |
| 749 | msgid = N_("value too large to be converted: %s"); |
| 750 | break; |
| 751 | |
| 752 | case SSE_INVALID_NUMBER: |
| 753 | msgid = N_("invalid number: %s"); |
| 754 | break; |
| 755 | |
| 756 | case SSE_VALID_BUT_FORBIDDEN_SUFFIX: |
| 757 | msgid = N_("rejecting suffix in input: %s (consider using --from)"); |
| 758 | break; |
| 759 | |
| 760 | case SSE_INVALID_SUFFIX: |
| 761 | msgid = N_("invalid suffix in input: %s"); |
| 762 | break; |
| 763 | |
| 764 | case SSE_MISSING_I_SUFFIX: |
| 765 | msgid = N_("missing 'i' suffix in input: %s (e.g Ki/Mi/Gi)"); |
| 766 | break; |
| 767 | |
| 768 | } |
| 769 | |
| 770 | if (inval_style != inval_ignore) |
| 771 | error (conv_exit_code, 0, gettext (msgid), quote (input_str)); |
| 772 | } |
| 773 | |
| 774 | /* Convert VAL to a human format string using PRECISION in BUF of size |
| 775 | BUF_SIZE. Use SCALE, GROUP, and ROUND to format. Return |
no outgoing calls
no test coverage detected