From b08db17162fddda97e6ee1ac625eae1430d22b64 Mon Sep 17 00:00:00 2001 From: Aleksey Veresov Date: Fri, 29 Nov 2019 18:50:04 +0300 Subject: [magi] Almost done! --- src/utils.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/utils.h') diff --git a/src/utils.h b/src/utils.h index 15904d0..f67c66c 100644 --- a/src/utils.h +++ b/src/utils.h @@ -2,10 +2,14 @@ #define MAGI_INCLUDED_UTILS -void magi_str_lowercase(char * str); +void magi_str_lowercase(char * str); + +/* Results of both create functions are malloced, so need to be freed. */ char * magi_str_create_copy(const char * begin, const char * end); char * magi_str_create(int len); -char * magi_str_add(char * dest, int * len, int * size, char c); + +/* Null only in case of error. */ +int magi_str_add(char ** dest, int * len, int * size, char c); #endif -- cgit v1.2.3