refactor(flatfile): single-line file header with format-version marker
All checks were successful
CI Code / Check coding style (pull_request) Successful in 59s
CI Code / Check spelling (pull_request) Successful in 1m35s
CI Code / Linux (debian) (pull_request) Successful in 7m24s
CI Code / Linux (ubuntu) (pull_request) Successful in 7m24s
CI Code / Code Coverage (pull_request) Successful in 6m56s
CI Code / Linux (arch) (pull_request) Successful in 9m36s

This commit is contained in:
2026-05-05 13:50:06 +03:00
parent b8a4900393
commit b9c3267aad
2 changed files with 17 additions and 14 deletions

View File

@@ -26,12 +26,12 @@
#define DIR_FLATLOG "flatlog"
#define FLATFILE_FORMAT_VERSION 1
#define FF_VERSION_PREFIX "# format-version: "
#define FLATFILE_HEADER \
"# profanity chat log — UTF-8, LF line endings\n" \
"# format-version: 1\n"
#define FF_MAX_LINE_LEN (10 * 1024 * 1024) /* 10 MB — reject lines longer than this */
#define FF_MAX_LMC_DEPTH 100 /* max correction chain depth */
#define FF_VERSION_MARKER "format-version: "
#define FF_STRINGIFY_(x) #x
#define FF_STRINGIFY(x) FF_STRINGIFY_(x)
#define FLATFILE_HEADER "# profanity chat log — UTF-8, LF line endings, " FF_VERSION_MARKER FF_STRINGIFY(FLATFILE_FORMAT_VERSION) "\n"
#define FF_MAX_LINE_LEN (10 * 1024 * 1024) /* 10 MB — reject lines longer than this */
#define FF_MAX_LMC_DEPTH 100 /* max correction chain depth */
// --- Shared global ---