diff options
author | Keith Packard <keithp@keithp.com> | 2016-10-31 18:53:09 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:49 -0800 |
commit | e2f4d25cd6f6f3787d4ee99264732d5b2ce23d4c (patch) | |
tree | 02247d4ef556ca80f07c839364b81a20c2a733c4 /src/lisp/ao_lisp_string.c | |
parent | 56d46ceaa1413415f25e47e81036426132f99924 (diff) |
altos: Add lisp reader
Diffstat (limited to 'src/lisp/ao_lisp_string.c')
-rw-r--r-- | src/lisp/ao_lisp_string.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_string.c b/src/lisp/ao_lisp_string.c index 87024271..1ab56933 100644 --- a/src/lisp/ao_lisp_string.c +++ b/src/lisp/ao_lisp_string.c @@ -44,6 +44,18 @@ ao_lisp_string_new(int len) { } char * +ao_lisp_string_copy(char *a) +{ + int alen = strlen(a); + + char *r = ao_lisp_alloc(alen + 1); + if (!r) + return NULL; + strcpy(r, a); + return r; +} + +char * ao_lisp_string_cat(char *a, char *b) { int alen = strlen(a); |