Files
Ben Allfree 1243b2bc1b refactor(core): split pal from kernel
Move the BBS kernel under core/ and host I/O under platforms/.
2026-10-07 15:54:38 -07:00

24 lines
488 B
C++

#include "serialize.h"
#include <cstddef>
#include "core/LoBBSStackGuard.h"
bool lobbsSerializeMachine(const LoBBSResponse &resp, std::string &out)
{
out.clear();
if (!resp.ok) {
out = resp.error;
return true;
}
for (const LoScalar &rec : resp.records) {
if (!out.empty())
out.push_back('\n');
std::string line;
if (!rec.encode(line, SIZE_MAX))
return false;
out += line;
}
return true;
}