The two concat functions are horribly inefficient */
| 39 | |
| 40 | /* The two concat functions are horribly inefficient */ |
| 41 | void concat(char** dst, const char* src) { |
| 42 | size_t dst_len = strlen(*dst); |
| 43 | size_t src_len = strlen(src); |
| 44 | *dst = realloc(*dst, src_len + dst_len + 1); |
| 45 | strcat(*dst, src); |
| 46 | } |
| 47 | |
| 48 | void concat_char(char** dst, char c) { |
| 49 | size_t len = strlen(*dst); |