mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-06 07:38:21 +00:00
Rename the existing format function to format_buf to clarify that it writes into a caller-provided buffer. Add a new format_alloc variant that allocates the output buffer internally using the provided allocator (or the default if NULL). The caller receives the allocated pointer and length and is responsible for freeing it. This is useful for consumers that do not know the required buffer size ahead of time and want to avoid the two-pass query-then-format pattern needed with format_buf.