util: move percent/permille/permyriad parser into percent-util.[ch]

A good chunk of parse-util.[ch] has been about parsing parts per
hundred/thousand/ten-thousand. Let's split that out into its own file.

No code changes, just some shuffling around.
This commit is contained in:
Lennart Poettering
2021-02-18 22:36:34 +01:00
parent 60dcf3dc1b
commit ed5033fd6c
16 changed files with 327 additions and 294 deletions
-9
View File
@@ -127,15 +127,6 @@ int safe_atod(const char *s, double *ret_d);
int parse_fractional_part_u(const char **s, size_t digits, unsigned *res);
int parse_percent_unbounded(const char *p);
int parse_percent(const char *p);
int parse_permille_unbounded(const char *p);
int parse_permille(const char *p);
int parse_permyriad_unbounded(const char *p);
int parse_permyriad(const char *p);
int parse_nice(const char *p, int *ret);
int parse_ip_port(const char *s, uint16_t *ret);