output: Fix API name. Implement lookup table for formats.
stack: Fix API linkage visibility.
output: Support some escaping.