diff options
| author | Marc André Tanner <mat@brain-dump.org> | 2020-02-12 15:24:08 +0100 |
|---|---|---|
| committer | Marc André Tanner <mat@brain-dump.org> | 2020-02-12 15:27:35 +0100 |
| commit | fe61af54987401bd7db299387e06d9af1078d1d4 (patch) | |
| tree | 32719883020300efcc4053734513556d7ede9738 | |
| parent | bb6de703f7ef309ce0ca4de829021293fb63d219 (diff) | |
| download | vis-fe61af54987401bd7db299387e06d9af1078d1d4.tar.gz vis-fe61af54987401bd7db299387e06d9af1078d1d4.tar.xz | |
sam: move parse_number code, no functional change
| -rw-r--r-- | sam.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -584,6 +584,15 @@ static char *parse_delimited(const char **s, int type) { return chunk; } +static int parse_number(const char **s) { + char *end = NULL; + int number = strtoull(*s, &end, 10); + if (end == *s) + return 0; + *s = end; + return number; +} + static char *parse_text(const char **s) { skip_spaces(s); if (**s != '\n') { @@ -658,15 +667,6 @@ static Regex *parse_regex(Vis *vis, const char **s) { return regex; } -static int parse_number(const char **s) { - char *end = NULL; - int number = strtoull(*s, &end, 10); - if (end == *s) - return 0; - *s = end; - return number; -} - static enum SamError parse_count(const char **s, Count *count) { count->mod = **s == '%'; |
