CS0019 helpers
#include “shell.h” #include typedef struct buildstring { int length; int capacity; } buildstring; // buildstring_append(bstr, ch) // Add `ch` to the end of the dynamically-allocated string `bstr->s`. void buildstring_append(buildstring* bstr, int ch) { if (bstr->length == bstr->capacity) { int new_capacity = bstr->capacity ? bstr->capacity * 2 : 32; bstr->s = (char*) realloc(bstr->s, new_capacity); bstr->capacity = […]