#include #include #include #include void main(const char *text) { uint32_t required_new_length = 0; bool needs_new = false; for (const char *c = text; c[0]; ++c) { ++required_new_length; if ((c[0] == '\\') && (c[1] == 'n')) { ++c; needs_new = true; } } if (needs_new) { char *new_text = get_block(required_new_length); const char *ci; char *co; for (ci = text, co = new_text; *ci; ++ci, ++co) if ((ci[0] == '\\') && (ci[1] == 'n')) { *co = '\n'; ++ci; } else *co = *ci; text = new_text; } struct popup p; info_popup(&p, text, (_pixel_t){.r = 0, .g = 0, .b = 0}, (_pixel_t){.r = 0xbf, .g = 0xbf, .b = 0xbf}); make_modal(&p); }