aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sam.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/sam.c b/sam.c
index 11d245b..8d3ab1f 100644
--- a/sam.c
+++ b/sam.c
@@ -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 == '%';