diff options
Diffstat (limited to 'src/mds-kbdc/make-tree.c')
-rw-r--r-- | src/mds-kbdc/make-tree.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/src/mds-kbdc/make-tree.c b/src/mds-kbdc/make-tree.c index f5bdf55..07a32ab 100644 --- a/src/mds-kbdc/make-tree.c +++ b/src/mds-kbdc/make-tree.c @@ -1,6 +1,6 @@ /** * mds — A micro-display server - * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (maandree@kth.se) + * Copyright © 2014, 2015, 2016, 2017 Mattias Andrée (m@maandree.se) * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -190,7 +190,7 @@ /** - * Suppress the next `line = STREND(line)` + * Suppress the next `line = strend(line)` */ #define NO_JUMP\ (*end = prev_end_char,\ @@ -566,11 +566,11 @@ fail: static int no_parameters(const char *restrict keyword) { - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; SKIP_SPACES(line); if (*line) { - end = STREND(line); + end = strend(line); NEW_ERROR(1, ERROR, "extra token after ‘%s’", keyword); } @@ -597,11 +597,11 @@ names_1(char **restrict var) int stray_char = 0; char *end_end; - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; SKIP_SPACES(line); if (!*line) { - line = original, end = STREND(line); + line = original, end = strend(line); NEW_ERROR(1, ERROR, "a name is expected"); } else { name_end = line; @@ -652,11 +652,11 @@ chars(char **restrict var) int escape, quote; if (too_few) return 0; - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; SKIP_SPACES(line); if (!*line) { - line = original, end = STREND(line); + line = original, end = strend(line); NEW_ERROR(1, ERROR, "too few parameters"); line = end, too_few = 1; } else { @@ -700,7 +700,7 @@ static int quotes(void) { char *line_ = line, *arg_end; - line = STREND(line); + line = strend(line); *end = prev_end_char; SKIP_SPACES(line); if (*line && *line != '"') { @@ -728,11 +728,11 @@ have_more_parameters(void) { if (too_few) return 0; - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; SKIP_SPACES(line); if (!*line) { - line = original, end = STREND(line); + line = original, end = strend(line); NEW_ERROR(1, ERROR, "too few parameters"); line = end, too_few = 1; return 0; @@ -989,16 +989,16 @@ parse_else(void) NEW_ERROR(1, ERROR, "runaway ‘else’ statement"); return 0; } - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; - end = STREND(line); + end = strend(line); SKIP_SPACES(line); i = stack_ptr - 1; while (!keyword_stack[i]) i--; if (strcmp(keyword_stack[i], "if")) { stack_ptr--; - line = original, end = STREND(line); + line = original, end = strend(line); NEW_ERROR(1, ERROR, "runaway ‘else’ statement"); } else if (!*line) { /* else */ @@ -1075,7 +1075,7 @@ parse_let(void) else LEAF; if (!*line) { - line = original, end = STREND(line), prev_end_char = '\0'; + line = original, end = strend(line), prev_end_char = '\0'; NEW_ERROR(1, ERROR, "too few parameters"); } else if (*line != '{') { #define node subnode @@ -1117,12 +1117,12 @@ parse_end(void) NEW_ERROR(1, ERROR, "runaway ‘end’ statement"); return 0; } - line = STREND(line); + line = strend(line); *end = prev_end_char, prev_end_char = '\0'; SKIP_SPACES(line); while (!keyword_stack[--stack_ptr]); if (!*line) { - line = original, end = STREND(line); + line = original, end = strend(line); NEW_ERROR(1, ERROR, "expecting a keyword after ‘end’"); } else if (strcmp(line, keyword_stack[stack_ptr])) { NEW_ERROR(1, ERROR, "expected ‘%s’ but got ‘%s’", keyword_stack[stack_ptr], line); @@ -1184,7 +1184,7 @@ parse_map(void) } if (!*line) return prev_end_char = *end, 0; - end = STREND(line), prev_end_char = *end; + end = strend(line), prev_end_char = *end; NEW_ERROR(1, ERROR, "too many parameters"); return 0; @@ -1268,7 +1268,7 @@ parse_array_elements(void) return 0; } else if (*line == '}') { line++; - end = STREND(line); + end = strend(line); END; line = end, prev_end_char = '\0'; goto done; |