tisp

tiny lisp
git clone git://edryd.org/tisp
Log | Files | Refs | LICENSE

commit 14380b5587eac94aa58114177f93f330326a2376
parent 27b3108e0703eb3ecf9f89bde636e509048502f7
Author: Ed van Bruggen <edvb@uw.edu>
Date:   Sun, 28 Oct 2018 23:57:56 -0700

Move skip_ws()

Diffstat:
tisp.c | 16++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/tisp.c b/tisp.c @@ -75,6 +75,14 @@ list_len(Val v) return a->t == NIL ? len : -1; } +void +skip_ws(Str str) +{ + str->d += strspn(str->d, " \t\n"); /* skip white space */ + for (; *str->d == ';'; str->d++) /* skip comments until newline */ + str->d += strcspn(str->d, "\n"); +} + static void die(const char *fmt, ...) { @@ -120,14 +128,6 @@ erealloc(void *p, size_t size) return p; } -void -skip_ws(Str str) -{ - str->d += strspn(str->d, " \t\n"); /* skip white space */ - for (; *str->d == ';'; str->d++) /* skip comments until newline */ - str->d += strcspn(str->d, "\n"); -} - static int issym(char c) {