Kelsidavis-WoWee/tools/editor/cli_help.hpp
Kelsi 68bded4f20 refactor(editor): extract printUsage into cli_help.cpp
Pulls the 597-line block of printf calls that emits the --help
text out of main.cpp into its own translation unit. printUsage
is the longest single function in main.cpp by far and was pure
boilerplate (no logic, just a flat list of help lines).

Function moved verbatim to wowee::editor::cli::printUsage; all
6 in-tree callers (--list-commands, --info-cli-stats,
--info-cli-categories, --info-cli-help, --validate-cli-help,
and the bare --help/-h handler) updated to the namespaced name.
The CLI-meta commands continue to capture printUsage's stdout
the same way, so behavior is identical (verified by re-running
--validate-cli-help, --info-cli-stats, --list-commands).

main.cpp drops 26,650 → 26,286 lines (-364 net; -597 from the
removal, +233 from the include and namespace-prefixing the
six call sites... wait, no, +6). Actually main.cpp net delta
matches the body extraction.
2026-05-08 20:12:15 -07:00

17 lines
437 B
C++

#pragma once
namespace wowee {
namespace editor {
namespace cli {
// Print the full --help / usage text to stdout. Drop-in
// replacement for the local-static printUsage main.cpp used to
// own; moved here so the 597-line block of printf calls doesn't
// keep main.cpp obese.
//
// argv0 is interpolated into the leading "Usage:" line.
void printUsage(const char* argv0);
} // namespace cli
} // namespace editor
} // namespace wowee