Commit graph

11 commits

Author SHA1 Message Date
lohhiiccc
ab90dbb07f refactor: reorganize src/ and includes/ for multi-binary support 2026-03-12 16:45:11 +01:00
lohhiiccc
cba820ae7a feat: add support for multiple destination 2026-03-07 16:20:58 +01:00
lohhiiccc
f6ca69f795 feat(cli): refactor CLI move utilities, and improve build/version metadata
- Move CLI internal headers to `includes/internal/cli/`
- Split CLI handler and parsing declarations across dedicated internal headers
- Move handler map to `option_map.c` and properly update references
- Relocate CLI utility source and test files from `utils` to `parse_utils`
- Refactor `cli.h` to only expose the public interface, move internal
  typedefs/functions out
- Update build system: add conditional git commit detection
2026-03-04 14:36:30 +01:00
lohhiiccc
18211e441c refactor(cli): replace int return codes with e_cli_code enum for argument parsing
- Introduces the e_cli_code enum for CLI status codes, replacing integer constants.
- Updates cli_parse_arguments to return e_cli_code instead of int.
- Refactors main.c, cli.h, and cli/parse.c to use the new enum.
2026-03-03 15:18:28 +01:00
lohhiiccc
88b65cc62e feat(cli): auto-generated options string for getopt_long API 2026-03-03 09:39:18 +01:00
lohhiiccc
2fc8d92e98 refactor(cli): replace runtime size vars with compile-time enum constants
Replace g_options_len and g_opt_str_len extern variables with
CLI_OPT_LEN and CLI_OPT_STR_LEN enum constants computed via X-macros.

Disables Variable Length Arrays (VLA) by enforcing the use of the -Wvla
flag in strict mode.
2026-03-03 09:06:28 +01:00
lohhiiccc
a6cdef89ca refactor(cli): use X-macro pattern for CLI options definition
Extract CLI options into a reusable macro (CLI_OPTIONS_LIST) in cli_opt.h
and refactor handler_map.c to eliminate manual option array duplication.
Calculate g_has_len automatically from option definitions.
2026-03-03 08:27:26 +01:00
lohhiiccc
ec3a3b8721 feat(cli): parse numeric option arguments and validate values 2026-03-02 12:48:28 +01:00
lohhiiccc
cff77eef9d refactor(cli): use named constants for return codes and implement flag handlers 2026-03-01 14:40:57 +01:00
lohhiiccc
b786e79287 feat: add version generation and CLI parsing
Add auto-generated version header and implement full command-line
argument parsing with getopt_long support.
2026-03-01 13:55:11 +01:00
lohhiiccc
d573990df8 feat: add CLI argument parsing structure 2026-02-09 15:05:03 +01:00