| 909 | } |
| 910 | |
| 911 | static void strbuf_humanise(struct strbuf *buf, off_t bytes, unsigned flags) |
| 912 | { |
| 913 | char *value; |
| 914 | const char *unit; |
| 915 | |
| 916 | humanise_bytes(bytes, &value, &unit, flags); |
| 917 | |
| 918 | /* |
| 919 | * TRANSLATORS: The first argument is the number string. The second |
| 920 | * argument is the unit string (i.e. "12.34 MiB/s"). |
| 921 | */ |
| 922 | strbuf_addf(buf, _("%s %s"), value, unit); |
| 923 | free(value); |
| 924 | } |
| 925 | |
| 926 | void strbuf_humanise_bytes(struct strbuf *buf, off_t bytes) |
| 927 | { |
no test coverage detected